Compare commits

..

15 Commits

Author SHA1 Message Date
Github Actions
859c36cb10 Publish
- @0x/contracts-asset-proxy@3.7.17
 - @0x/contracts-broker@1.1.35
 - @0x/contracts-coordinator@3.1.36
 - @0x/contracts-dev-utils@1.3.34
 - @0x/contracts-erc1155@2.1.35
 - @0x/contracts-erc20@3.3.14
 - @0x/contracts-erc721@3.1.35
 - @0x/contracts-exchange-forwarder@4.2.36
 - @0x/contracts-exchange-libs@4.3.35
 - @0x/contracts-exchange@3.2.36
 - @0x/contracts-extensions@6.2.30
 - @0x/contracts-integrations@2.7.62
 - @0x/contracts-multisig@4.1.36
 - @0x/contracts-staking@2.0.43
 - @0x/contracts-test-utils@5.4.6
 - @0x/contracts-treasury@1.3.0
 - @0x/contracts-utils@4.7.14
 - @0x/contracts-zero-ex@0.27.0
 - @0x/asset-swapper@16.24.0
 - @0x/contract-addresses@6.5.0
 - @0x/contract-wrappers-test@12.2.51
 - @0x/contract-wrappers@13.17.3
 - @0x/migrations@8.0.12
 - @0x/order-utils@10.4.27
 - @0x/protocol-utils@1.8.0
2021-08-06 04:54:38 +00:00
Github Actions
3e34386812 Updated CHANGELOGS & MD docs 2021-08-06 04:54:34 +00:00
Jacob Evans
a35af11981 feat: Clipper (#299)
* feat: Clipper

* feat: Curve tricrypto2 (#302)

* Scope down the token list search space for Clipper

* update deployed addresses
2021-08-06 14:12:43 +10:00
mzhu25
59eabec71e Add proposal 1 and test (#298)
* Add proposal 1 and test

* update changelog
2021-08-05 13:10:36 -07:00
Github Actions
bf4c7e7d50 Publish
- @0x/contracts-integrations@2.7.61
 - @0x/asset-swapper@16.23.1
2021-07-29 15:23:54 +00:00
Github Actions
fd098ca4df Updated CHANGELOGS & MD docs 2021-07-29 15:23:49 +00:00
Lawrence Forman
c360f8d8fd Publish (#296)
- @0x/contracts-integrations@2.7.60
 - @0x/asset-swapper@16.23.0

Co-authored-by: Github Actions <github-actions@github.com>
2021-07-29 10:54:37 -04:00
Github Actions
b358559421 Publish
- @0x/contracts-integrations@2.7.60
 - @0x/asset-swapper@16.23.0
2021-07-16 22:11:44 +00:00
Github Actions
df5aad8e8e Updated CHANGELOGS & MD docs 2021-07-16 22:11:39 +00:00
Andreas Andreakis
8dbf79db59 fix: lint (#289) 2021-07-16 12:24:56 -07:00
Andreas Andreakis
1839608e84 feat: ACryptoS StableSwap (#284) 2021-07-15 15:19:40 -07:00
Github Actions
6e3e795b8b Publish
- @0x/contracts-integrations@2.7.59
 - @0x/asset-swapper@16.22.0
2021-07-13 22:19:54 +00:00
Github Actions
d9c410a7e3 Updated CHANGELOGS & MD docs 2021-07-13 22:19:49 +00:00
Romain Butteaud
609727afe8 feat: Saddle alETH, D4 pools (#283) 2021-07-13 14:22:16 -07:00
Romain Butteaud
8a5c74c0b4 feat: IronSwap (#281)
* feat: IronSwap

* feat: IronSwap, changelog

* feat: IronSwap, prettier
2021-07-13 14:07:45 -07:00
86 changed files with 1030 additions and 185 deletions

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "3.7.17",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "3.7.16",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.7.17 - _August 6, 2021_
* Dependencies updated
## v3.7.16 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "3.7.16",
"version": "3.7.17",
"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.17.2",
"@0x/contract-wrappers": "^13.17.3",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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.34",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/order-utils": "^10.4.26",
"@0x/contracts-erc1155": "^2.1.35",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/order-utils": "^10.4.27",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "1.1.35",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "1.1.34",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.1.35 - _August 6, 2021_
* Dependencies updated
## v1.1.34 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-broker",
"version": "1.1.34",
"version": "1.1.35",
"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.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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.26",
"@0x/order-utils": "^10.4.27",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0"

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "3.1.36",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "3.1.35",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.36 - _August 6, 2021_
* Dependencies updated
## v3.1.35 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "3.1.35",
"version": "3.1.36",
"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.16",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-gen": "^2.0.38",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@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.4.0",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contract-addresses": "^6.5.0",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@0x/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "1.3.34",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "1.3.33",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.3.34 - _August 6, 2021_
* Dependencies updated
## v1.3.33 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-dev-utils",
"version": "1.3.33",
"version": "1.3.34",
"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.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-test-utils": "^5.4.6",
"@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": 1628225642,
"version": "2.1.35",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "2.1.34",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.1.35 - _August 6, 2021_
* Dependencies updated
## v2.1.34 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "2.1.34",
"version": "2.1.35",
"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.13",
"@0x/contracts-utils": "^4.7.14",
"@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.5",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",
"lodash": "^4.17.11"

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "3.3.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "3.3.13",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.3.14 - _August 6, 2021_
* Dependencies updated
## v3.3.13 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "3.3.13",
"version": "3.3.14",
"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.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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": 1628225642,
"version": "3.1.35",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "3.1.34",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.35 - _August 6, 2021_
* Dependencies updated
## v3.1.34 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "3.1.34",
"version": "3.1.35",
"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.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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": 1628225642,
"version": "4.2.36",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "4.2.35",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.2.36 - _August 6, 2021_
* Dependencies updated
## v4.2.35 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "4.2.35",
"version": "4.2.36",
"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.16",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc1155": "^2.1.34",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc1155": "^2.1.35",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@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": 1628225642,
"version": "4.3.35",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "4.3.34",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.3.35 - _August 6, 2021_
* Dependencies updated
## v4.3.34 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-libs",
"version": "4.3.34",
"version": "4.3.35",
"engines": {
"node": ">=6.12"
},
@@ -81,9 +81,9 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/order-utils": "^10.4.26",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@0x/order-utils": "^10.4.27",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "3.2.36",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "3.2.35",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.2.36 - _August 6, 2021_
* Dependencies updated
## v3.2.35 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "3.2.35",
"version": "3.2.36",
"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.16",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-multisig": "^4.1.35",
"@0x/contracts-staking": "^2.0.42",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-multisig": "^4.1.36",
"@0x/contracts-staking": "^2.0.43",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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.33",
"@0x/contracts-erc1155": "^2.1.34",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/order-utils": "^10.4.26",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc1155": "^2.1.35",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/order-utils": "^10.4.27",
"@0x/utils": "^6.4.3",
"lodash": "^4.17.11"
},

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "6.2.30",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "6.2.29",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.2.30 - _August 6, 2021_
* Dependencies updated
## v6.2.29 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "6.2.29",
"version": "6.2.30",
"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.16",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-utils": "^4.7.14",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@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.5",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/typescript-typings": "^5.2.0",
"ethereum-types": "^3.5.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-integrations",
"version": "2.7.58",
"version": "2.7.62",
"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.4.0",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contracts-broker": "^1.1.34",
"@0x/contracts-coordinator": "^3.1.35",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-exchange-forwarder": "^4.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-extensions": "^6.2.29",
"@0x/contract-addresses": "^6.5.0",
"@0x/contract-wrappers": "^13.17.3",
"@0x/contracts-broker": "^1.1.35",
"@0x/contracts-coordinator": "^3.1.36",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-exchange-forwarder": "^4.2.36",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-extensions": "^6.2.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-utils": "^4.7.14",
"@0x/coordinator-server": "^1.0.5",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.11",
"@0x/order-utils": "^10.4.26",
"@0x/protocol-utils": "^1.7.2",
"@0x/migrations": "^8.0.12",
"@0x/order-utils": "^10.4.27",
"@0x/protocol-utils": "^1.8.0",
"@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": "^16.21.0",
"@0x/asset-swapper": "^16.24.0",
"@0x/base-contract": "^6.4.0",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-erc1155": "^2.1.34",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-multisig": "^4.1.35",
"@0x/contracts-staking": "^2.0.42",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-zero-ex": "^0.26.0",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-erc1155": "^2.1.35",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-multisig": "^4.1.36",
"@0x/contracts-staking": "^2.0.43",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-zero-ex": "^0.27.0",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "4.1.36",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "4.1.35",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.1.36 - _August 6, 2021_
* Dependencies updated
## v4.1.35 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "4.1.35",
"version": "4.1.36",
"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.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@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": 1628225642,
"version": "2.0.43",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "2.0.42",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.43 - _August 6, 2021_
* Dependencies updated
## v2.0.42 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-staking",
"version": "2.0.42",
"version": "2.0.43",
"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.16",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-utils": "^4.7.14",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@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.5",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "5.4.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "5.4.5",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v5.4.6 - _August 6, 2021_
* Dependencies updated
## v5.4.5 - _June 22, 2021_
* Dependencies updated

View File

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

View File

@@ -1,4 +1,14 @@
[
{
"version": "1.3.0",
"changes": [
{
"note": "Added proposal 1 params and test",
"pr": 298
}
],
"timestamp": 1628225642
},
{
"timestamp": 1624356181,
"version": "1.2.3",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.3.0 - _August 6, 2021_
* Added proposal 1 params and test (#298)
## v1.2.3 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-treasury",
"version": "1.2.3",
"version": "1.3.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.4.0",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contract-addresses": "^6.5.0",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-staking": "^2.0.42",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-staking": "^2.0.43",
"@0x/contracts-test-utils": "^5.4.6",
"@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.7.2",
"@0x/protocol-utils": "^1.8.0",
"@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

@@ -151,4 +151,72 @@ blockchainTests.fork.skip('Treasury proposal mainnet fork tests', env => {
);
});
});
describe('Proposal 1', () => {
it('works', async () => {
const proposal = proposals[1];
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 = '0xab66cc8fd10457ebc9d13b9760c835f0a4cbc487';
verifyEventsFromLogs(
executeTx.logs,
[
{
_from: TREASURY_ADDRESS,
_to: recipient,
_value: new BigNumber(330_813).times('1e18'),
},
{
_from: TREASURY_ADDRESS,
_to: recipient,
_value: new BigNumber(420000).times('1e18'),
},
],
ERC20TokenEvents.Transfer,
);
});
});
});

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "4.7.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "4.7.13",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.7.14 - _August 6, 2021_
* Dependencies updated
## v4.7.13 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "4.7.13",
"version": "4.7.14",
"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.5",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@0x/sol-compiler": "^4.7.3",
"@0x/tslint-config": "^4.1.4",
"@0x/types": "^3.3.3",

View File

@@ -1,4 +1,13 @@
[
{
"version": "0.27.0",
"changes": [
{
"note": "Add `Clipper` as a custom liquidity source"
}
],
"timestamp": 1628225642
},
{
"version": "0.26.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.27.0 - _August 6, 2021_
* Add `Clipper` as a custom liquidity source
## v0.26.0 - _June 22, 2021_
* Add Lido stETH deposit integration (#260)

View File

@@ -25,6 +25,7 @@ import "./BridgeProtocols.sol";
import "./mixins/MixinBalancer.sol";
import "./mixins/MixinBalancerV2.sol";
import "./mixins/MixinBancor.sol";
import "./mixins/MixinClipper.sol";
import "./mixins/MixinCoFiX.sol";
import "./mixins/MixinCurve.sol";
import "./mixins/MixinCurveV2.sol";
@@ -50,6 +51,7 @@ contract BridgeAdapter is
MixinBalancer,
MixinBalancerV2,
MixinBancor,
MixinClipper,
MixinCoFiX,
MixinCurve,
MixinCurveV2,
@@ -75,6 +77,7 @@ contract BridgeAdapter is
MixinBalancer()
MixinBalancerV2()
MixinBancor(weth)
MixinClipper(weth)
MixinCoFiX()
MixinCurve(weth)
MixinCurveV2()
@@ -245,6 +248,13 @@ contract BridgeAdapter is
sellAmount,
order.bridgeData
);
} else if (protocolId == BridgeProtocols.CLIPPER) {
boughtAmount = _tradeClipper(
sellToken,
buyToken,
sellAmount,
order.bridgeData
);
} else {
boughtAmount = _tradeZeroExBridge(
sellToken,

View File

@@ -49,4 +49,5 @@ library BridgeProtocols {
uint128 internal constant KYBERDMM = 19;
uint128 internal constant CURVEV2 = 20;
uint128 internal constant LIDO = 21;
uint128 internal constant CLIPPER = 22;
}

View File

@@ -0,0 +1,148 @@
// 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 "@0x/contracts-erc20/contracts/src/v06/IEtherTokenV06.sol";
import "../IBridgeAdapter.sol";
import "../../../vendor/ILiquidityProvider.sol";
contract MixinClipper {
using LibERC20TokenV06 for IERC20TokenV06;
/// @dev Mainnet address of the WETH contract.
IEtherTokenV06 private immutable WETH;
constructor(IEtherTokenV06 weth)
public
{
WETH = weth;
}
function _tradeClipper(
IERC20TokenV06 sellToken,
IERC20TokenV06 buyToken,
uint256 sellAmount,
bytes memory bridgeData
)
internal
returns (uint256 boughtAmount)
{
// We can only use ETH with Clipper, no WETH available
(ILiquidityProvider clipper, bytes memory auxiliaryData) =
abi.decode(bridgeData, (ILiquidityProvider, bytes));
if (sellToken == WETH) {
boughtAmount = _executeSellEthForToken(
clipper,
buyToken,
sellAmount,
auxiliaryData
);
} else if (buyToken == WETH) {
boughtAmount = _executeSellTokenForEth(
clipper,
sellToken,
sellAmount,
auxiliaryData
);
} else {
boughtAmount = _executeSellTokenForToken(
clipper,
sellToken,
buyToken,
sellAmount,
auxiliaryData
);
}
return boughtAmount;
}
function _executeSellEthForToken(
ILiquidityProvider clipper,
IERC20TokenV06 buyToken,
uint256 sellAmount,
bytes memory auxiliaryData
)
private
returns (uint256 boughtAmount)
{
// Clipper requires ETH and doesn't support WETH
WETH.withdraw(sellAmount);
boughtAmount = clipper.sellEthForToken{ value: sellAmount }(
buyToken,
address(this),
1,
auxiliaryData
);
}
function _executeSellTokenForEth(
ILiquidityProvider clipper,
IERC20TokenV06 sellToken,
uint256 sellAmount,
bytes memory auxiliaryData
)
private
returns (uint256 boughtAmount)
{
// Optimization: We can transfer the tokens into clipper rather than
// have an allowance updated
sellToken.compatTransfer(address(clipper), sellAmount);
boughtAmount = clipper.sellTokenForEth(
sellToken,
payable(address(this)),
1,
auxiliaryData
);
// we want WETH for possible future trades
WETH.deposit{ value: boughtAmount }();
}
function _executeSellTokenForToken(
ILiquidityProvider clipper,
IERC20TokenV06 sellToken,
IERC20TokenV06 buyToken,
uint256 sellAmount,
bytes memory auxiliaryData
)
private
returns (uint256 boughtAmount)
{
// Optimization: We can transfer the tokens into clipper rather than
// have an allowance updated
sellToken.compatTransfer(address(clipper), sellAmount);
boughtAmount = clipper.sellTokenForToken(
sellToken,
buyToken,
address(this),
1,
auxiliaryData
);
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.26.0",
"version": "0.27.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,OtcOrdersFeature,IOtcOrdersFeature",
"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|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|ISimpleFunctionRegistryFeature|IStaking|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC20Transformer|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinBalancer|MixinBalancerV2|MixinBancor|MixinCoFiX|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinKyber|MixinKyberDmm|MixinLido|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OtcOrdersFeature|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|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|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|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|ISimpleFunctionRegistryFeature|IStaking|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC20Transformer|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinBalancer|MixinBalancerV2|MixinBancor|MixinClipper|MixinCoFiX|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinKyber|MixinKyberDmm|MixinLido|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OtcOrdersFeature|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|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|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.4.0",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contract-addresses": "^6.5.0",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.26",
"@0x/order-utils": "^10.4.27",
"@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.7.2",
"@0x/protocol-utils": "^1.8.0",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -82,6 +82,7 @@ import * as MetaTransactionsFeature from '../test/generated-artifacts/MetaTransa
import * as MixinBalancer from '../test/generated-artifacts/MixinBalancer.json';
import * as MixinBalancerV2 from '../test/generated-artifacts/MixinBalancerV2.json';
import * as MixinBancor from '../test/generated-artifacts/MixinBancor.json';
import * as MixinClipper from '../test/generated-artifacts/MixinClipper.json';
import * as MixinCoFiX from '../test/generated-artifacts/MixinCoFiX.json';
import * as MixinCryptoCom from '../test/generated-artifacts/MixinCryptoCom.json';
import * as MixinCurve from '../test/generated-artifacts/MixinCurve.json';
@@ -257,6 +258,7 @@ export const artifacts = {
MixinBalancer: MixinBalancer as ContractArtifact,
MixinBalancerV2: MixinBalancerV2 as ContractArtifact,
MixinBancor: MixinBancor as ContractArtifact,
MixinClipper: MixinClipper as ContractArtifact,
MixinCoFiX: MixinCoFiX as ContractArtifact,
MixinCryptoCom: MixinCryptoCom as ContractArtifact,
MixinCurve: MixinCurve as ContractArtifact,

View File

@@ -80,6 +80,7 @@ export * from '../test/generated-wrappers/meta_transactions_feature';
export * from '../test/generated-wrappers/mixin_balancer';
export * from '../test/generated-wrappers/mixin_balancer_v2';
export * from '../test/generated-wrappers/mixin_bancor';
export * from '../test/generated-wrappers/mixin_clipper';
export * from '../test/generated-wrappers/mixin_co_fi_x';
export * from '../test/generated-wrappers/mixin_crypto_com';
export * from '../test/generated-wrappers/mixin_curve';

View File

@@ -113,6 +113,7 @@
"test/generated-artifacts/MixinBalancer.json",
"test/generated-artifacts/MixinBalancerV2.json",
"test/generated-artifacts/MixinBancor.json",
"test/generated-artifacts/MixinClipper.json",
"test/generated-artifacts/MixinCoFiX.json",
"test/generated-artifacts/MixinCryptoCom.json",
"test/generated-artifacts/MixinCurve.json",

View File

@@ -1,4 +1,48 @@
[
{
"version": "16.24.0",
"changes": [
{
"note": "Add `Clipper` as a custom liquidity source",
"pr": 299
},
{
"note": "Added `Curve` `Tricrypto2` and `ESD` v2",
"pr": 302
}
],
"timestamp": 1628225642
},
{
"version": "16.23.1",
"changes": [
{
"note": "Fix fill amount rounding error when covnerting fills to orders.",
"pr": 296
}
],
"timestamp": 1627572227
},
{
"version": "16.23.0",
"changes": [
{
"note": "ACryptoS",
"pr": 284
}
],
"timestamp": 1626473497
},
{
"version": "16.22.0",
"changes": [
{
"note": "IronSwap",
"pr": 281
}
],
"timestamp": 1626214787
},
{
"version": "16.21.0",
"changes": [

View File

@@ -5,6 +5,23 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v16.24.0 - _August 6, 2021_
* Add `Clipper` as a custom liquidity source (#299)
* Added `Curve` `Tricrypto2` and `ESD` v2 (#302)
## v16.23.1 - _July 29, 2021_
* Fix fill amount rounding error when covnerting fills to orders. (#296)
## v16.23.0 - _July 16, 2021_
* ACryptoS (#284)
## v16.22.0 - _July 13, 2021_
* IronSwap (#281)
## v16.21.0 - _July 10, 2021_
* JetSwap (#280)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "16.21.0",
"version": "16.24.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.4.0",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-zero-ex": "^0.26.0",
"@0x/contract-addresses": "^6.5.0",
"@0x/contract-wrappers": "^13.17.3",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-zero-ex": "^0.27.0",
"@0x/dev-utils": "^4.2.7",
"@0x/json-schemas": "^6.1.3",
"@0x/protocol-utils": "^1.7.2",
"@0x/protocol-utils": "^1.8.0",
"@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.16",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-exchange-libs": "^4.3.35",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/contracts-utils": "^4.7.14",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.0.11",
"@0x/migrations": "^8.0.12",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -2,6 +2,7 @@ import { ChainId } from '@0x/contract-addresses';
import { BigNumber, NULL_BYTES } from '@0x/utils';
import {
ACRYPTOS_BSC_INFOS,
APESWAP_ROUTER_BY_CHAIN_ID,
BAKERYSWAP_ROUTER_BY_CHAIN_ID,
BELT_BSC_INFOS,
@@ -18,6 +19,7 @@ import {
ELLIPSIS_BSC_INFOS,
FIREBIRDONESWAP_BSC_INFOS,
FIREBIRDONESWAP_POLYGON_INFOS,
IRONSWAP_POLYGON_INFOS,
JETSWAP_ROUTER_BY_CHAIN_ID,
JULSWAP_ROUTER_BY_CHAIN_ID,
KYBER_BANNED_RESERVES,
@@ -286,6 +288,19 @@ export function getSaddleInfosForPair(chainId: ChainId, takerToken: string, make
);
}
export function getIronSwapInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.Polygon) {
return [];
}
return Object.values(IRONSWAP_POLYGON_INFOS).filter(c =>
[makerToken, takerToken].every(
t =>
(c.tokens.includes(t) && c.metaTokens === undefined) ||
(c.tokens.includes(t) && [makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
),
);
}
export function getXSigmaInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.Mainnet) {
return [];
@@ -299,6 +314,19 @@ export function getXSigmaInfosForPair(chainId: ChainId, takerToken: string, make
);
}
export function getAcryptosInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.BSC) {
return [];
}
return Object.values(ACRYPTOS_BSC_INFOS).filter(c =>
[makerToken, takerToken].every(
t =>
(c.tokens.includes(t) && c.metaTokens === undefined) ||
(c.tokens.includes(t) && [makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
),
);
}
export function getShellLikeInfosForPair(
chainId: ChainId,
takerToken: string,
@@ -336,8 +364,10 @@ export function getCurveLikeInfosForPair(
| ERC20BridgeSource.Ellipsis
| ERC20BridgeSource.Smoothy
| ERC20BridgeSource.Saddle
| ERC20BridgeSource.IronSwap
| ERC20BridgeSource.XSigma
| ERC20BridgeSource.FirebirdOneSwap,
| ERC20BridgeSource.FirebirdOneSwap
| ERC20BridgeSource.ACryptos,
): CurveDetailedInfo[] {
let pools: CurveInfo[] = [];
switch (source) {
@@ -374,6 +404,12 @@ export function getCurveLikeInfosForPair(
case ERC20BridgeSource.FirebirdOneSwap:
pools = getFirebirdOneSwapInfosForPair(chainId, takerToken, makerToken);
break;
case ERC20BridgeSource.IronSwap:
pools = getIronSwapInfosForPair(chainId, takerToken, makerToken);
break;
case ERC20BridgeSource.ACryptos:
pools = getAcryptosInfosForPair(chainId, takerToken, makerToken);
break;
default:
throw new Error(`Unknown Curve like source ${source}`);
}

View File

@@ -98,6 +98,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.UniswapV3,
ERC20BridgeSource.CurveV2,
ERC20BridgeSource.ShibaSwap,
ERC20BridgeSource.Clipper,
]),
[ChainId.Ropsten]: new SourceFilters([
ERC20BridgeSource.Kyber,
@@ -133,6 +134,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.FirebirdOneSwap,
ERC20BridgeSource.JetSwap,
ERC20BridgeSource.ACryptos,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
@@ -153,6 +155,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.MultiHop,
ERC20BridgeSource.JetSwap,
ERC20BridgeSource.IronSwap,
]),
},
new SourceFilters([]),
@@ -196,6 +199,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.UniswapV3,
ERC20BridgeSource.CurveV2,
ERC20BridgeSource.ShibaSwap,
ERC20BridgeSource.Clipper,
]),
[ChainId.Ropsten]: new SourceFilters([
ERC20BridgeSource.Kyber,
@@ -231,6 +235,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.FirebirdOneSwap,
ERC20BridgeSource.JetSwap,
ERC20BridgeSource.ACryptos,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
@@ -251,6 +256,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.MultiHop,
ERC20BridgeSource.JetSwap,
ERC20BridgeSource.IronSwap,
]),
},
new SourceFilters([]),
@@ -357,6 +363,7 @@ export const MAINNET_TOKENS = {
crETH: '0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd',
ankrETH: '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb',
vETH: '0x898bad2774eb97cf6b94605677f43b41871410b1',
alETH: '0x0100546f2cd4c9d97f798ffc9755e47865ff7ee6',
HT: '0x6f259637dcD74C767781E37Bc6133cd6A68aa161',
// Mirror Protocol
UST: '0xa47c8bf37f92abed4a126bda807a7b7498661acd',
@@ -367,6 +374,9 @@ export const MAINNET_TOKENS = {
alUSD: '0xbc6da0fe9ad5f3b0d58160288917aa56653660e9',
FRAX: '0x853d955acef822db058eb8505911ed77f175b99e',
LUSD: '0x5f98805a4e8be255a32880fdec7f6728c6568ba0',
FEI: '0x956f47f50a910163d8bf957cf5846d573e7f87ca',
DSU: '0x605d26fbd5be761089281d5cec2ce86eea667109',
ESS: '0x24ae124c4cc33d6791f8e8b63520ed7107ac8b3e',
};
export const BSC_TOKENS = {
@@ -377,8 +387,12 @@ export const BSC_TOKENS = {
DAI: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
PAX: '0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094',
UST: '0x23396cf899ca06c4472205fc903bdb4de249d6fc',
VAI: '0x4bd17003473389a42daf6a0a729f6fdb328bbbd7',
WEX: '0xa9c41a46a6b3531d28d5c32f6633dd2ff05dfb90',
WETH: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
BTCB: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c',
renBTC: '0xfce146bf3146100cfe5db4129cf6c82b0ef4ad8c',
pBTC: '0xed28a457a5a76596ac48d87c0f577020f6ea1c4c',
};
export const POLYGON_TOKENS = {
@@ -438,10 +452,12 @@ export const CURVE_POOLS = {
FRAX: '0xd632f22692fac7611d2aa1c0d552930d43caed3b',
LUSD: '0xed279fdd11ca84beef15af5d39bb4d4bee23f0ca',
BUSD: '0x4807862aa8b2bf68830e4c8dc86d0e9a998e085a',
DSU3CRV: '0x6ec80df362d7042c50d4469bcfbc174c9dd9109a',
};
export const CURVE_V2_POOLS = {
tricrypto: '0x80466c64868e1ab14a1ddf27a676c3fcbe638fe5',
tricrypto2: '0xd51a44d3fae010294c616388b506acda1bfaae46',
};
export const CURVE_POLYGON_POOLS = {
@@ -475,6 +491,12 @@ export const SMOOTHY_POOLS = {
export const SADDLE_POOLS = {
stables: '0x3911f80530595fbd01ab1516ab61255d75aeb066',
bitcoins: '0x4f6a43ad7cba042606decaca730d4ce0a57ac62e',
alETH: '0xa6018520eaacc06c30ff2e1b3ee2c7c22e64196a',
d4: '0xc69ddcd4dfef25d8a793241834d4cc4b3668ead6',
};
export const IRONSWAP_POOLS = {
is3usd: '0x837503e8a8753ae17fb8c8151b8e6f586defcb57',
};
export const NERVE_POOLS = {
@@ -501,6 +523,13 @@ export const FIREBIRDONESWAP_POLYGON_POOLS = {
oneswap: '0x01c9475dbd36e46d1961572c8de24b74616bae9e',
};
export const ACRYPTOS_POOLS = {
acs4usd: '0xb3f0c9ea1f05e312093fdb031e789a756659b0ac',
acs4vai: '0x191409d5a4effe25b0f4240557ba2192d18a191e',
acs4ust: '0x99c92765efc472a9709ced86310d64c4573c4b77',
acs3btc: '0xbe7caa236544d1b9a0e7f91e94b9f5bfd3b5ca81',
};
export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
{
[ChainId.Mainnet]: [
@@ -824,6 +853,11 @@ export const CURVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_POOLS.ankreth,
gasSchedule: 125e3,
}),
[CURVE_POOLS.DSU3CRV]: createCurveMetaTriPool({
tokens: [MAINNET_TOKENS.DSU],
pool: CURVE_POOLS.DSU3CRV,
gasSchedule: 387e3,
}),
};
export const CURVE_V2_MAINNET_INFOS: { [name: string]: CurveInfo } = {
@@ -832,6 +866,11 @@ export const CURVE_V2_MAINNET_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_V2_POOLS.tricrypto,
gasSchedule: 300e3,
}),
[CURVE_V2_POOLS.tricrypto2]: createCurveExchangeV2Pool({
tokens: [MAINNET_TOKENS.USDT, MAINNET_TOKENS.WBTC, MAINNET_TOKENS.WETH],
pool: CURVE_V2_POOLS.tricrypto2,
gasSchedule: 300e3,
}),
};
export const CURVE_POLYGON_INFOS: { [name: string]: CurveInfo } = {
@@ -936,6 +975,36 @@ export const SADDLE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
metaTokens: undefined,
gasSchedule: 150e3,
},
[SADDLE_POOLS.alETH]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
sellQuoteFunctionSelector: CurveFunctionSelectors.calculateSwap,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
poolAddress: SADDLE_POOLS.alETH,
tokens: [MAINNET_TOKENS.WETH, MAINNET_TOKENS.alETH, MAINNET_TOKENS.sETH],
metaTokens: undefined,
gasSchedule: 200e3,
},
[SADDLE_POOLS.d4]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
sellQuoteFunctionSelector: CurveFunctionSelectors.calculateSwap,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
poolAddress: SADDLE_POOLS.d4,
tokens: [MAINNET_TOKENS.alUSD, MAINNET_TOKENS.FEI, MAINNET_TOKENS.FRAX, MAINNET_TOKENS.LUSD],
metaTokens: undefined,
gasSchedule: 150e3,
},
};
export const IRONSWAP_POLYGON_INFOS: { [name: string]: CurveInfo } = {
[IRONSWAP_POOLS.is3usd]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
sellQuoteFunctionSelector: CurveFunctionSelectors.calculateSwap,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
poolAddress: IRONSWAP_POOLS.is3usd,
tokens: [POLYGON_TOKENS.USDC, POLYGON_TOKENS.USDT, POLYGON_TOKENS.DAI],
metaTokens: undefined,
gasSchedule: 150e3,
},
};
export const SMOOTHY_MAINNET_INFOS: { [name: string]: CurveInfo } = {
@@ -1007,6 +1076,44 @@ export const FIREBIRDONESWAP_POLYGON_INFOS: { [name: string]: CurveInfo } = {
},
};
const ACRYPTOS_ACS4USD_POOL_BSC_TOKENS = [BSC_TOKENS.BUSD, BSC_TOKENS.USDT, BSC_TOKENS.DAI, BSC_TOKENS.USDC];
const createAcryptosMetaUsdPool = (info: { tokens: string[]; pool: string; gasSchedule: number }) => ({
exchangeFunctionSelector: CurveFunctionSelectors.exchange_underlying,
sellQuoteFunctionSelector: CurveFunctionSelectors.get_dy_underlying,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
tokens: [...info.tokens, ...ACRYPTOS_ACS4USD_POOL_BSC_TOKENS],
metaTokens: info.tokens,
poolAddress: info.pool,
gasSchedule: info.gasSchedule,
});
export const ACRYPTOS_BSC_INFOS: { [name: string]: CurveInfo } = {
[ACRYPTOS_POOLS.acs4usd]: createCurveExchangePool({
tokens: ACRYPTOS_ACS4USD_POOL_BSC_TOKENS,
pool: ACRYPTOS_POOLS.acs4usd,
gasSchedule: 145e3,
}),
[ACRYPTOS_POOLS.acs4vai]: createAcryptosMetaUsdPool({
tokens: [BSC_TOKENS.VAI],
pool: ACRYPTOS_POOLS.acs4vai,
gasSchedule: 300e3,
}),
[ACRYPTOS_POOLS.acs4ust]: createAcryptosMetaUsdPool({
tokens: [BSC_TOKENS.UST],
pool: ACRYPTOS_POOLS.acs4ust,
gasSchedule: 300e3,
}),
[ACRYPTOS_POOLS.acs3btc]: createCurveExchangePool({
tokens: [BSC_TOKENS.BTCB, BSC_TOKENS.renBTC, BSC_TOKENS.pBTC],
pool: ACRYPTOS_POOLS.acs3btc,
gasSchedule: 145e3,
}),
};
/**
* Kyber reserve prefixes
* 0xff Fed price reserve
@@ -1319,6 +1426,22 @@ export const LIDO_INFO_BY_CHAIN = valueByChainId<LidoInfo>(
},
);
export const CLIPPER_INFO_BY_CHAIN = valueByChainId(
{
[ChainId.Mainnet]: {
poolAddress: '0xe82906b6b1b04f631d126c974af57a3a7b6a99d9',
tokens: [
MAINNET_TOKENS.WETH, // technically ETH but our sampler and mixin handle this
MAINNET_TOKENS.WBTC,
MAINNET_TOKENS.USDC,
MAINNET_TOKENS.USDT,
MAINNET_TOKENS.DAI,
],
},
},
{ poolAddress: NULL_ADDRESS, tokens: [] },
);
export const BALANCER_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer';
export const BALANCER_TOP_POOLS_FETCHED = 250;
export const BALANCER_MAX_POOLS_FETCHED = 3;
@@ -1486,6 +1609,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.Ellipsis]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.Smoothy]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.Saddle]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.IronSwap]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.XSigma]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.FirebirdOneSwap]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.MultiBridge]: () => 350e3,
@@ -1548,6 +1672,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
return gas;
},
[ERC20BridgeSource.Lido]: () => 226e3,
[ERC20BridgeSource.Clipper]: () => 170e3,
//
// BSC
@@ -1560,6 +1685,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.CheeseSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.JulSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.WaultSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.ACryptos]: fillData => (fillData as CurveFillData).pool.gasSchedule,
//
// Polygon

View File

@@ -3,7 +3,7 @@ import { AbiEncoder, BigNumber } from '@0x/utils';
import { AssetSwapperContractAddresses, MarketOperation } from '../../types';
import { MAX_UINT256, ZERO_AMOUNT } from './constants';
import { MAX_UINT256, NULL_BYTES, ZERO_AMOUNT } from './constants';
import {
AggregationError,
BalancerFillData,
@@ -176,6 +176,12 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'ShibaSwap');
case ERC20BridgeSource.JetSwap:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'JetSwap');
case ERC20BridgeSource.IronSwap:
return encodeBridgeSourceId(BridgeProtocol.Nerve, 'IronSwap');
case ERC20BridgeSource.ACryptos:
return encodeBridgeSourceId(BridgeProtocol.Curve, 'ACryptoS');
case ERC20BridgeSource.Clipper:
return encodeBridgeSourceId(BridgeProtocol.Clipper, 'Clipper');
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -208,6 +214,8 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
case ERC20BridgeSource.IronSwap:
case ERC20BridgeSource.ACryptos:
const curveFillData = (order as OptimizedMarketBridgeOrder<CurveFillData>).fillData;
bridgeData = encoder.encode([
curveFillData.pool.poolAddress,
@@ -312,6 +320,10 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
const lidoFillData = (order as OptimizedMarketBridgeOrder<LidoFillData>).fillData;
bridgeData = encoder.encode([lidoFillData.stEthTokenAddress]);
break;
case ERC20BridgeSource.Clipper:
const clipperFillData = (order as OptimizedMarketBridgeOrder<LiquidityProviderFillData>).fillData;
bridgeData = encoder.encode([clipperFillData.poolAddress, NULL_BYTES]);
break;
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -427,6 +439,8 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.Saddle]: curveEncoder,
[ERC20BridgeSource.XSigma]: curveEncoder,
[ERC20BridgeSource.FirebirdOneSwap]: curveEncoder,
[ERC20BridgeSource.IronSwap]: curveEncoder,
[ERC20BridgeSource.ACryptos]: curveEncoder,
// UniswapV2 like, (router, address[])
[ERC20BridgeSource.Bancor]: routerAddressPathEncoder,
[ERC20BridgeSource.UniswapV2]: routerAddressPathEncoder,
@@ -467,14 +481,18 @@ export const BRIDGE_ENCODERS: {
]),
[ERC20BridgeSource.KyberDmm]: AbiEncoder.create('(address,address[],address[])'),
[ERC20BridgeSource.Lido]: AbiEncoder.create('(address)'),
[ERC20BridgeSource.Clipper]: AbiEncoder.create([
{ name: 'provider', type: 'address' },
{ name: 'data', type: 'bytes' },
]),
};
function getFillTokenAmounts(fill: CollapsedFill, side: MarketOperation): [BigNumber, BigNumber] {
return [
// Maker asset amount.
side === MarketOperation.Sell ? fill.output : fill.input,
side === MarketOperation.Sell ? fill.output.integerValue(BigNumber.ROUND_DOWN) : fill.input,
// Taker asset amount.
side === MarketOperation.Sell ? fill.input : fill.output,
side === MarketOperation.Sell ? fill.input : fill.output.integerValue(BigNumber.ROUND_UP),
];
}

View File

@@ -20,6 +20,7 @@ import {
import {
BALANCER_V2_VAULT_ADDRESS_BY_CHAIN,
BANCOR_REGISTRY_BY_CHAIN_ID,
CLIPPER_INFO_BY_CHAIN,
DODOV1_CONFIG_BY_CHAIN_ID,
DODOV2_FACTORIES_BY_CHAIN_ID,
KYBER_CONFIG_BY_CHAIN_ID,
@@ -359,9 +360,10 @@ export class SamplerOperations {
takerToken: string,
takerFillAmounts: BigNumber[],
gasCost: number,
source: ERC20BridgeSource = ERC20BridgeSource.LiquidityProvider,
): SourceQuoteOperation<LiquidityProviderFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.LiquidityProvider,
source,
fillData: {
poolAddress: providerAddress,
gasCost,
@@ -378,9 +380,10 @@ export class SamplerOperations {
takerToken: string,
makerFillAmounts: BigNumber[],
gasCost: number,
source: ERC20BridgeSource = ERC20BridgeSource.LiquidityProvider,
): SourceQuoteOperation<LiquidityProviderFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.LiquidityProvider,
source,
fillData: {
poolAddress: providerAddress,
gasCost,
@@ -1265,6 +1268,8 @@ export class SamplerOperations {
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
case ERC20BridgeSource.IronSwap:
case ERC20BridgeSource.ACryptos:
return getCurveLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getCurveSellQuotes(
pool,
@@ -1320,9 +1325,9 @@ export class SamplerOperations {
takerToken,
makerToken,
) || []
).map(poolAddress =>
).map(balancerPool =>
this.getBalancerSellQuotes(
poolAddress,
balancerPool,
makerToken,
takerToken,
takerFillAmounts,
@@ -1356,9 +1361,9 @@ export class SamplerOperations {
takerToken,
makerToken,
) || []
).map(poolAddress =>
).map(creamPool =>
this.getBalancerSellQuotes(
poolAddress,
creamPool,
makerToken,
takerToken,
takerFillAmounts,
@@ -1447,6 +1452,32 @@ export class SamplerOperations {
return this.getLidoSellQuotes(lidoInfo, makerToken, takerToken, takerFillAmounts);
}
case ERC20BridgeSource.Clipper:
const { poolAddress: clipperPoolAddress, tokens: clipperTokens } = CLIPPER_INFO_BY_CHAIN[
this.chainId
];
if (
clipperPoolAddress === NULL_ADDRESS ||
!clipperTokens.includes(makerToken) ||
!clipperTokens.includes(takerToken)
) {
return [];
}
// Clipper requires WETH to be represented as address(0)
const adjustedMakerToken =
makerToken === NATIVE_FEE_TOKEN_BY_CHAIN_ID[this.chainId] ? NULL_ADDRESS : makerToken;
const adjustedTakerToken =
takerToken === NATIVE_FEE_TOKEN_BY_CHAIN_ID[this.chainId] ? NULL_ADDRESS : takerToken;
// Supports the PLP interface
return this.getLiquidityProviderSellQuotes(
clipperPoolAddress,
adjustedMakerToken,
adjustedTakerToken,
takerFillAmounts,
// tslint:disable-next-line: custom-no-magic-numbers
0, // Not used for Clipper
ERC20BridgeSource.Clipper,
);
default:
throw new Error(`Unsupported sell sample source: ${source}`);
}
@@ -1537,6 +1568,8 @@ export class SamplerOperations {
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
case ERC20BridgeSource.IronSwap:
case ERC20BridgeSource.ACryptos:
return getCurveLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getCurveBuyQuotes(
pool,
@@ -1714,6 +1747,32 @@ export class SamplerOperations {
return this.getLidoBuyQuotes(lidoInfo, makerToken, takerToken, makerFillAmounts);
}
case ERC20BridgeSource.Clipper:
const { poolAddress: clipperPoolAddress, tokens: clipperTokens } = CLIPPER_INFO_BY_CHAIN[
this.chainId
];
if (
clipperPoolAddress === NULL_ADDRESS ||
!clipperTokens.includes(makerToken) ||
!clipperTokens.includes(takerToken)
) {
return [];
}
// Clipper requires WETH to be represented as address(0)
const adjustedMakerToken =
makerToken === NATIVE_FEE_TOKEN_BY_CHAIN_ID[this.chainId] ? NULL_ADDRESS : makerToken;
const adjustedTakerToken =
takerToken === NATIVE_FEE_TOKEN_BY_CHAIN_ID[this.chainId] ? NULL_ADDRESS : takerToken;
// Supports the PLP interface
return this.getLiquidityProviderBuyQuotes(
clipperPoolAddress,
adjustedMakerToken,
adjustedTakerToken,
makerFillAmounts,
// tslint:disable-next-line: custom-no-magic-numbers
0, // Not used for Clipper
ERC20BridgeSource.Clipper,
);
default:
throw new Error(`Unsupported buy sample source: ${source}`);
}

View File

@@ -69,6 +69,7 @@ export enum ERC20BridgeSource {
CurveV2 = 'Curve_V2',
Lido = 'Lido',
ShibaSwap = 'ShibaSwap',
Clipper = 'Clipper',
// BSC only
PancakeSwap = 'PancakeSwap',
PancakeSwapV2 = 'PancakeSwap_V2',
@@ -80,6 +81,7 @@ export enum ERC20BridgeSource {
CafeSwap = 'CafeSwap',
CheeseSwap = 'CheeseSwap',
JulSwap = 'JulSwap',
ACryptos = 'ACryptoS',
// Polygon only
QuickSwap = 'QuickSwap',
ComethSwap = 'ComethSwap',
@@ -88,6 +90,7 @@ export enum ERC20BridgeSource {
Polydex = 'Polydex',
FirebirdOneSwap = 'FirebirdOneSwap',
JetSwap = 'JetSwap',
IronSwap = 'IronSwap',
}
export type SourcesWithPoolsCache = ERC20BridgeSource.Balancer | ERC20BridgeSource.BalancerV2 | ERC20BridgeSource.Cream;

View File

@@ -1,4 +1,14 @@
[
{
"version": "6.5.0",
"changes": [
{
"note": "Deployed `Clipper`",
"pr": 299
}
],
"timestamp": 1628225642
},
{
"version": "6.4.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.5.0 - _August 6, 2021_
* Deployed `Clipper` (#299)
## v6.4.0 - _June 22, 2021_
* Deployed Lido FQT

View File

@@ -36,7 +36,7 @@
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
"payTakerTransformer": "0x4638a7ebe75b911b995d0ec73a81e4f85f41f24e",
"affiliateFeeTransformer": "0xda6d9fc5998f550a094585cf9171f0e8ee3ac59f",
"fillQuoteTransformer": "0x6dfdb2537683ce6101f9090a78197dd58c30bfac",
"fillQuoteTransformer": "0xb4fa284689c9784a60d840eb136bb16c5246191f",
"positiveSlippageFeeTransformer": "0xa9416ce1dbde8d331210c07b5c253d94ee4cc3fd"
}
},

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers-test",
"version": "12.2.50",
"version": "12.2.51",
"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.17.2",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contract-wrappers": "^13.17.3",
"@0x/contracts-test-utils": "^5.4.6",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.11",
"@0x/order-utils": "^10.4.26",
"@0x/migrations": "^8.0.12",
"@0x/order-utils": "^10.4.27",
"@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": 1628225642,
"version": "13.17.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "13.17.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v13.17.3 - _August 6, 2021_
* Dependencies updated
## v13.17.2 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers",
"version": "13.17.2",
"version": "13.17.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.4.0",
"@0x/contract-addresses": "^6.5.0",
"@0x/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1628225642,
"version": "8.0.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "8.0.11",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v8.0.12 - _August 6, 2021_
* Dependencies updated
## v8.0.11 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.0.11",
"version": "8.0.12",
"engines": {
"node": ">=6.12"
},
@@ -68,20 +68,20 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.4.0",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-coordinator": "^3.1.35",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc1155": "^2.1.34",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-erc721": "^3.1.34",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-forwarder": "^4.2.35",
"@0x/contracts-extensions": "^6.2.29",
"@0x/contracts-multisig": "^4.1.35",
"@0x/contracts-staking": "^2.0.42",
"@0x/contracts-utils": "^4.7.13",
"@0x/contracts-zero-ex": "^0.26.0",
"@0x/contract-addresses": "^6.5.0",
"@0x/contracts-asset-proxy": "^3.7.17",
"@0x/contracts-coordinator": "^3.1.36",
"@0x/contracts-dev-utils": "^1.3.34",
"@0x/contracts-erc1155": "^2.1.35",
"@0x/contracts-erc20": "^3.3.14",
"@0x/contracts-erc721": "^3.1.35",
"@0x/contracts-exchange": "^3.2.36",
"@0x/contracts-exchange-forwarder": "^4.2.36",
"@0x/contracts-extensions": "^6.2.30",
"@0x/contracts-multisig": "^4.1.36",
"@0x/contracts-staking": "^2.0.43",
"@0x/contracts-utils": "^4.7.14",
"@0x/contracts-zero-ex": "^0.27.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": 1628225642,
"version": "10.4.27",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1624356181,
"version": "10.4.26",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v10.4.27 - _August 6, 2021_
* Dependencies updated
## v10.4.26 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/order-utils",
"version": "10.4.26",
"version": "10.4.27",
"engines": {
"node": ">=6.12"
},
@@ -69,8 +69,8 @@
},
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/contract-addresses": "^6.4.0",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contract-addresses": "^6.5.0",
"@0x/contract-wrappers": "^13.17.3",
"@0x/json-schemas": "^6.1.3",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.8.0",
"changes": [
{
"note": "Add `Clipper`"
}
],
"timestamp": 1628225642
},
{
"timestamp": 1624356181,
"version": "1.7.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.8.0 - _August 6, 2021_
* Add `Clipper`
## v1.7.2 - _June 22, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/protocol-utils",
"version": "1.7.2",
"version": "1.8.0",
"engines": {
"node": ">=6.12"
},
@@ -63,8 +63,8 @@
},
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/contract-addresses": "^6.4.0",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contract-addresses": "^6.5.0",
"@0x/contract-wrappers": "^13.17.3",
"@0x/json-schemas": "^6.1.3",
"@0x/subproviders": "^6.5.3",
"@0x/utils": "^6.4.3",

View File

@@ -131,6 +131,7 @@ export enum BridgeProtocol {
KyberDmm,
CurveV2,
Lido,
Clipper,
}
// tslint:enable: enum-naming