Compare commits

..

6 Commits

Author SHA1 Message Date
Github Actions
efd83be779 Publish
- @0x/contracts-integrations@2.7.52
 - @0x/asset-swapper@6.18.1
2021-06-22 23:37:28 +00:00
Github Actions
603bc1d51c Updated CHANGELOGS & MD docs 2021-06-22 23:37:23 +00:00
Romain Butteaud
32a930a7fc feat: FirebirdOneSwap, ApeSwap [TKR-182] [TKR-173] (#265)
* fix: removing TITAN and IRON as intermediate tokens

* feat: FirebirdOneSwap, ApeSwap, intermediate tokens update

* chore: changelog
2021-06-22 16:04:09 -07:00
Github Actions
f464bf68d7 Publish
- @0x/contracts-asset-proxy@3.7.16
 - @0x/contracts-broker@1.1.34
 - @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-forwarder@4.2.35
 - @0x/contracts-exchange-libs@4.3.34
 - @0x/contracts-exchange@3.2.35
 - @0x/contracts-extensions@6.2.29
 - @0x/contracts-integrations@2.7.51
 - @0x/contracts-multisig@4.1.35
 - @0x/contracts-staking@2.0.42
 - @0x/contracts-test-utils@5.4.5
 - @0x/contracts-treasury@1.2.3
 - @0x/contracts-utils@4.7.13
 - @0x/contracts-zero-ex@0.26.0
 - @0x/asset-swapper@6.18.0
 - @0x/contract-addresses@6.4.0
 - @0x/contract-wrappers-test@12.2.50
 - @0x/contract-wrappers@13.17.2
 - @0x/migrations@8.0.11
 - @0x/order-utils@10.4.26
 - @0x/protocol-utils@1.7.2
2021-06-22 10:03:41 +00:00
Github Actions
ebdc4fb509 Updated CHANGELOGS & MD docs 2021-06-22 10:03:35 +00:00
Kim Persson
7580719586 feat: Lido StETH deposit integration [TKR-90] (#260)
* feat: initial stab at the LidoSampler and the MixinLido

* feat: full integration of lido sampler and mixin

* fix: return pooled Ether amount not shares & properly unwrap WETH

* refactor: clean up Lido sampler and data passing

* fix: lower gas schedule for WETH to stETH deposits

* refactor: remove MixinLido unused ETH code path

* chore: add changelog entries

* fix: lower Lido gas schedule slightly

* fix: revert MixinLido on unsupported token pair

* fix: address review comments, improve early exit if wrong tokens

* fix: add contract addresses to Lido FQT
2021-06-22 11:25:47 +02:00
89 changed files with 878 additions and 192 deletions

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "3.7.15",
"version": "3.7.16",
"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.1",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@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.33",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange-libs": "^4.3.33",
"@0x/order-utils": "^10.4.25",
"@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/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-broker",
"version": "1.1.33",
"version": "1.1.34",
"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.15",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-exchange-libs": "^4.3.33",
"@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-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@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.25",
"@0x/order-utils": "^10.4.26",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0"

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "3.1.34",
"version": "3.1.35",
"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.15",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-dev-utils": "^1.3.33",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-gen": "^2.0.38",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.25",
"@0x/order-utils": "^10.4.26",
"@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.3.1",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@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/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-dev-utils",
"version": "1.3.32",
"version": "1.3.33",
"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.15",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-test-utils": "^5.4.5",
"@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": 1624356181,
"version": "2.1.34",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "2.1.33",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "2.1.33",
"version": "2.1.34",
"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.12",
"@0x/contracts-utils": "^4.7.13",
"@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.4",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",
"lodash": "^4.17.11"

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "3.3.12",
"version": "3.3.13",
"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.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@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": 1624356181,
"version": "3.1.34",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "3.1.33",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "3.1.33",
"version": "3.1.34",
"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.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@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": 1624356181,
"version": "4.2.35",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "4.2.34",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "4.2.34",
"version": "4.2.35",
"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.15",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-erc1155": "^2.1.33",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-exchange-libs": "^4.3.33",
"@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-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.25",
"@0x/order-utils": "^10.4.26",
"@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": 1624356181,
"version": "4.3.34",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "4.3.33",

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "3.2.34",
"version": "3.2.35",
"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.15",
"@0x/contracts-exchange-libs": "^4.3.33",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-multisig": "^4.1.34",
"@0x/contracts-staking": "^2.0.41",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@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/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.32",
"@0x/contracts-erc1155": "^2.1.33",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/order-utils": "^10.4.25",
"@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/utils": "^6.4.3",
"lodash": "^4.17.11"
},

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "6.2.28",
"version": "6.2.29",
"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.15",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-exchange-libs": "^4.3.33",
"@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-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-utils": "^4.7.13",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.25",
"@0x/order-utils": "^10.4.26",
"@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.4",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/typescript-typings": "^5.2.0",
"ethereum-types": "^3.5.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-integrations",
"version": "2.7.50",
"version": "2.7.52",
"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.3.1",
"@0x/contract-wrappers": "^13.17.1",
"@0x/contracts-broker": "^1.1.33",
"@0x/contracts-coordinator": "^3.1.34",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-exchange-forwarder": "^4.2.34",
"@0x/contracts-exchange-libs": "^4.3.33",
"@0x/contracts-extensions": "^6.2.28",
"@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/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-utils": "^4.7.13",
"@0x/coordinator-server": "^1.0.5",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.10",
"@0x/order-utils": "^10.4.25",
"@0x/protocol-utils": "^1.7.1",
"@0x/migrations": "^8.0.11",
"@0x/order-utils": "^10.4.26",
"@0x/protocol-utils": "^1.7.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.17.3",
"@0x/asset-swapper": "^6.18.1",
"@0x/base-contract": "^6.4.0",
"@0x/contracts-asset-proxy": "^3.7.15",
"@0x/contracts-erc1155": "^2.1.33",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-multisig": "^4.1.34",
"@0x/contracts-staking": "^2.0.41",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-zero-ex": "^0.25.1",
"@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/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "4.1.34",
"version": "4.1.35",
"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.15",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@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": 1624356181,
"version": "2.0.42",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "2.0.41",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-staking",
"version": "2.0.41",
"version": "2.0.42",
"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.15",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-exchange-libs": "^4.3.33",
"@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-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-utils": "^4.7.13",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.25",
"@0x/order-utils": "^10.4.26",
"@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.4",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0",

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1624356181,
"version": "1.2.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "1.2.2",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-treasury",
"version": "1.2.2",
"version": "1.2.3",
"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.3.1",
"@0x/contracts-asset-proxy": "^3.7.15",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contract-addresses": "^6.4.0",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-staking": "^2.0.41",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-staking": "^2.0.42",
"@0x/contracts-test-utils": "^5.4.5",
"@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.1",
"@0x/protocol-utils": "^1.7.2",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,14 @@
[
{
"version": "0.26.0",
"changes": [
{
"note": "Add Lido stETH deposit integration",
"pr": 260
}
],
"timestamp": 1624356181
},
{
"timestamp": 1623382456,
"version": "0.25.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.26.0 - _June 22, 2021_
* Add Lido stETH deposit integration (#260)
## v0.25.1 - _June 11, 2021_
* Dependencies updated

View File

@@ -33,6 +33,7 @@ import "./mixins/MixinDodo.sol";
import "./mixins/MixinDodoV2.sol";
import "./mixins/MixinKyber.sol";
import "./mixins/MixinKyberDmm.sol";
import "./mixins/MixinLido.sol";
import "./mixins/MixinMakerPSM.sol";
import "./mixins/MixinMooniswap.sol";
import "./mixins/MixinMStable.sol";
@@ -57,6 +58,7 @@ contract BridgeAdapter is
MixinDodoV2,
MixinKyber,
MixinKyberDmm,
MixinLido,
MixinMakerPSM,
MixinMooniswap,
MixinMStable,
@@ -80,6 +82,7 @@ contract BridgeAdapter is
MixinDodo()
MixinDodoV2()
MixinKyber(weth)
MixinLido(weth)
MixinMakerPSM()
MixinMooniswap(weth)
MixinMStable()
@@ -235,6 +238,13 @@ contract BridgeAdapter is
sellAmount,
order.bridgeData
);
} else if (protocolId == BridgeProtocols.LIDO) {
boughtAmount = _tradeLido(
sellToken,
buyToken,
sellAmount,
order.bridgeData
);
} else {
boughtAmount = _tradeZeroExBridge(
sellToken,

View File

@@ -48,4 +48,5 @@ library BridgeProtocols {
uint128 internal constant UNISWAPV3 = 18;
uint128 internal constant KYBERDMM = 19;
uint128 internal constant CURVEV2 = 20;
uint128 internal constant LIDO = 21;
}

View File

@@ -0,0 +1,70 @@
// 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";
/// @dev Minimal interface for minting StETH
interface ILido {
/// @dev Adds eth to the pool
/// @param _referral optional address for referrals
/// @return StETH Amount of shares generated
function submit(address _referral) external payable returns (uint256 StETH);
/// @dev Retrieve the current pooled ETH representation of the shares amount
/// @param _sharesAmount amount of shares
/// @return amount of pooled ETH represented by the shares amount
function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);
}
contract MixinLido {
using LibERC20TokenV06 for IERC20TokenV06;
using LibERC20TokenV06 for IEtherTokenV06;
IEtherTokenV06 private immutable WETH;
constructor(IEtherTokenV06 weth)
public
{
WETH = weth;
}
function _tradeLido(
IERC20TokenV06 sellToken,
IERC20TokenV06 buyToken,
uint256 sellAmount,
bytes memory bridgeData
)
internal
returns (uint256 boughtAmount)
{
(ILido lido) = abi.decode(bridgeData, (ILido));
if (address(sellToken) == address(WETH) && address(buyToken) == address(lido)) {
WETH.withdraw(sellAmount);
boughtAmount = lido.getPooledEthByShares(lido.submit{ value: sellAmount}(address(0)));
} else {
revert("MixinLido/UNSUPPORTED_TOKEN_PAIR");
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.25.1",
"version": "0.26.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|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|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.3.1",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contract-addresses": "^6.4.0",
"@0x/contracts-erc20": "^3.3.13",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.25",
"@0x/order-utils": "^10.4.26",
"@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.1",
"@0x/protocol-utils": "^1.7.2",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -90,6 +90,7 @@ import * as MixinDodo from '../test/generated-artifacts/MixinDodo.json';
import * as MixinDodoV2 from '../test/generated-artifacts/MixinDodoV2.json';
import * as MixinKyber from '../test/generated-artifacts/MixinKyber.json';
import * as MixinKyberDmm from '../test/generated-artifacts/MixinKyberDmm.json';
import * as MixinLido from '../test/generated-artifacts/MixinLido.json';
import * as MixinMakerPSM from '../test/generated-artifacts/MixinMakerPSM.json';
import * as MixinMooniswap from '../test/generated-artifacts/MixinMooniswap.json';
import * as MixinMStable from '../test/generated-artifacts/MixinMStable.json';
@@ -264,6 +265,7 @@ export const artifacts = {
MixinDodoV2: MixinDodoV2 as ContractArtifact,
MixinKyber: MixinKyber as ContractArtifact,
MixinKyberDmm: MixinKyberDmm as ContractArtifact,
MixinLido: MixinLido as ContractArtifact,
MixinMStable: MixinMStable as ContractArtifact,
MixinMakerPSM: MixinMakerPSM as ContractArtifact,
MixinMooniswap: MixinMooniswap as ContractArtifact,

View File

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

View File

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

View File

@@ -1,4 +1,24 @@
[
{
"version": "6.18.1",
"changes": [
{
"note": "FirebirdOneSwap, ApeSwap. New hop tokens: DFYN, BANANA, WEXPOLY",
"pr": 265
}
],
"timestamp": 1624405040
},
{
"version": "6.18.0",
"changes": [
{
"note": "Add Lido stETH deposit integration",
"pr": 260
}
],
"timestamp": 1624356181
},
{
"version": "6.17.3",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.18.1 - _June 22, 2021_
* FirebirdOneSwap, ApeSwap. New hop tokens: DFYN, BANANA, WEXPOLY (#265)
## v6.18.0 - _June 22, 2021_
* Add Lido stETH deposit integration (#260)
## v6.17.3 - _June 16, 2021_
* QUICK, TITAN, IRON as intermediate tokens, integrating WaultSwap and Polydex for Polygon, Curve renBTC pool

View File

@@ -29,6 +29,7 @@ import "./DODOV2Sampler.sol";
import "./Eth2DaiSampler.sol";
import "./KyberSampler.sol";
import "./KyberDmmSampler.sol";
import "./LidoSampler.sol";
import "./LiquidityProviderSampler.sol";
import "./MakerPSMSampler.sol";
import "./MultiBridgeSampler.sol";
@@ -54,6 +55,7 @@ contract ERC20BridgeSampler is
Eth2DaiSampler,
KyberSampler,
KyberDmmSampler,
LidoSampler,
LiquidityProviderSampler,
MakerPSMSampler,
MStableSampler,

View File

@@ -0,0 +1,91 @@
// 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;
pragma experimental ABIEncoderV2;
import "./SamplerUtils.sol";
contract LidoSampler is SamplerUtils {
struct LidoInfo {
address stEthToken;
address wethToken;
}
/// @dev Sample sell quotes from Lido
/// @param lidoInfo Info regarding a specific Lido deployment
/// @param takerToken Address of the taker token (what to sell).
/// @param makerToken Address of the maker token (what to buy).
/// @param takerTokenAmounts Taker token sell amount for each sample.
/// @return makerTokenAmounts Maker amounts bought at each taker token
/// amount.
function sampleSellsFromLido(
LidoInfo memory lidoInfo,
address takerToken,
address makerToken,
uint256[] memory takerTokenAmounts
)
public
pure
returns (uint256[] memory)
{
_assertValidPair(makerToken, takerToken);
if (takerToken != lidoInfo.wethToken || makerToken != address(lidoInfo.stEthToken)) {
// Return 0 values if not selling WETH for stETH
uint256 numSamples = takerTokenAmounts.length;
uint256[] memory makerTokenAmounts = new uint256[](numSamples);
return makerTokenAmounts;
}
// Minting stETH is always 1:1 therefore we can just return the same amounts back
return takerTokenAmounts;
}
/// @dev Sample buy quotes from Lido.
/// @param lidoInfo Info regarding a specific Lido deployment
/// @param takerToken Address of the taker token (what to sell).
/// @param makerToken Address of the maker token (what to buy).
/// @param makerTokenAmounts Maker token buy amount for each sample.
/// @return takerTokenAmounts Taker amounts sold at each maker token
/// amount.
function sampleBuysFromLido(
LidoInfo memory lidoInfo,
address takerToken,
address makerToken,
uint256[] memory makerTokenAmounts
)
public
pure
returns (uint256[] memory)
{
_assertValidPair(makerToken, takerToken);
if (takerToken != lidoInfo.wethToken || makerToken != address(lidoInfo.stEthToken)) {
// Return 0 values if not buying stETH for WETH
uint256 numSamples = makerTokenAmounts.length;
uint256[] memory takerTokenAmounts = new uint256[](numSamples);
return takerTokenAmounts;
}
// Minting stETH is always 1:1 therefore we can just return the same amounts back
return makerTokenAmounts;
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "6.17.3",
"version": "6.18.1",
"engines": {
"node": ">=6.12"
},
@@ -39,7 +39,7 @@
"config": {
"publicInterfaceContracts": "ERC20BridgeSampler,BalanceChecker,FakeTaker",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2Sampler|BancorSampler|CurveSampler|DODOSampler|DODOV2Sampler|DummyLiquidityProvider|ERC20BridgeSampler|Eth2DaiSampler|FakeTaker|IBalancer|IBancor|ICurve|IEth2Dai|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberDmmSampler|KyberSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|MultiBridgeSampler|NativeOrderSampler|SamplerUtils|ShellSampler|SmoothySampler|TestERC20BridgeSampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2Sampler|BancorSampler|CurveSampler|DODOSampler|DODOV2Sampler|DummyLiquidityProvider|ERC20BridgeSampler|Eth2DaiSampler|FakeTaker|IBalancer|IBancor|ICurve|IEth2Dai|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberDmmSampler|KyberSampler|LidoSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|MultiBridgeSampler|NativeOrderSampler|SamplerUtils|ShellSampler|SmoothySampler|TestERC20BridgeSampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
"postpublish": {
"assets": []
}
@@ -60,13 +60,13 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.3.1",
"@0x/contract-wrappers": "^13.17.1",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-zero-ex": "^0.25.1",
"@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/dev-utils": "^4.2.7",
"@0x/json-schemas": "^6.1.3",
"@0x/protocol-utils": "^1.7.1",
"@0x/protocol-utils": "^1.7.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.15",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-exchange-libs": "^4.3.33",
"@0x/contracts-asset-proxy": "^3.7.16",
"@0x/contracts-exchange": "^3.2.35",
"@0x/contracts-exchange-libs": "^4.3.34",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/contracts-utils": "^4.7.13",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.0.10",
"@0x/migrations": "^8.0.11",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -16,6 +16,8 @@ import {
CURVE_V2_POLYGON_INFOS,
DFYN_ROUTER_BY_CHAIN_ID,
ELLIPSIS_BSC_INFOS,
FIREBIRDONESWAP_BSC_INFOS,
FIREBIRDONESWAP_POLYGON_INFOS,
JULSWAP_ROUTER_BY_CHAIN_ID,
KYBER_BANNED_RESERVES,
KYBER_BRIDGED_LIQUIDITY_PREFIX,
@@ -36,7 +38,7 @@ import {
SUSHISWAP_ROUTER_BY_CHAIN_ID,
SWERVE_MAINNET_INFOS,
UNISWAPV2_ROUTER_BY_CHAIN_ID,
WAULT_ROUTER_BY_CHAIN_ID,
WAULTSWAP_ROUTER_BY_CHAIN_ID,
XSIGMA_MAINNET_INFOS,
} from './constants';
import { CurveInfo, ERC20BridgeSource } from './types';
@@ -195,6 +197,30 @@ export function getNerveInfosForPair(chainId: ChainId, takerToken: string, maker
);
}
export function getFirebirdOneSwapInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId === ChainId.BSC) {
return Object.values(FIREBIRDONESWAP_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),
),
);
} else if (chainId === ChainId.Polygon) {
return Object.values(FIREBIRDONESWAP_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),
),
);
} else {
return [];
}
}
export function getBeltInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.BSC) {
return [];
@@ -308,7 +334,8 @@ export function getCurveLikeInfosForPair(
| ERC20BridgeSource.Ellipsis
| ERC20BridgeSource.Smoothy
| ERC20BridgeSource.Saddle
| ERC20BridgeSource.XSigma,
| ERC20BridgeSource.XSigma
| ERC20BridgeSource.FirebirdOneSwap,
): CurveDetailedInfo[] {
let pools: CurveInfo[] = [];
switch (source) {
@@ -342,6 +369,9 @@ export function getCurveLikeInfosForPair(
case ERC20BridgeSource.XSigma:
pools = getXSigmaInfosForPair(chainId, takerToken, makerToken);
break;
case ERC20BridgeSource.FirebirdOneSwap:
pools = getFirebirdOneSwapInfosForPair(chainId, takerToken, makerToken);
break;
default:
throw new Error(`Unknown Curve like source ${source}`);
}
@@ -399,7 +429,7 @@ export function uniswapV2LikeRouterAddress(
case ERC20BridgeSource.Dfyn:
return DFYN_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.WaultSwap:
return WAULT_ROUTER_BY_CHAIN_ID[chainId];
return WAULTSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.Polydex:
return POLYDEX_ROUTER_BY_CHAIN_ID[chainId];
default:

View File

@@ -17,6 +17,7 @@ import {
FillData,
GetMarketOrdersOpts,
KyberSamplerOpts,
LidoInfo,
LiquidityProviderFillData,
LiquidityProviderRegistry,
MakerPsmFillData,
@@ -87,6 +88,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.CryptoCom,
ERC20BridgeSource.Linkswap,
ERC20BridgeSource.Lido,
ERC20BridgeSource.MakerPsm,
ERC20BridgeSource.KyberDmm,
ERC20BridgeSource.Smoothy,
@@ -128,6 +130,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.FirebirdOneSwap,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
@@ -141,6 +144,8 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.CurveV2,
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.Polydex,
ERC20BridgeSource.ApeSwap,
ERC20BridgeSource.FirebirdOneSwap,
]),
},
new SourceFilters([]),
@@ -171,6 +176,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.Dodo,
ERC20BridgeSource.DodoV2,
ERC20BridgeSource.Cream,
ERC20BridgeSource.Lido,
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.CryptoCom,
ERC20BridgeSource.Linkswap,
@@ -215,6 +221,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.FirebirdOneSwap,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
@@ -228,6 +235,8 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.CurveV2,
ERC20BridgeSource.WaultSwap,
ERC20BridgeSource.Polydex,
ERC20BridgeSource.ApeSwap,
ERC20BridgeSource.FirebirdOneSwap,
]),
},
new SourceFilters([]),
@@ -347,12 +356,15 @@ export const MAINNET_TOKENS = {
};
export const BSC_TOKENS = {
WBNB: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c',
BUSD: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
USDT: '0x55d398326f99059ff775485246999027b3197955',
USDC: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
DAI: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
PAX: '0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094',
UST: '0x23396cf899ca06c4472205fc903bdb4de249d6fc',
WEX: '0xa9c41a46a6b3531d28d5c32f6633dd2ff05dfb90',
WETH: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
};
export const POLYGON_TOKENS = {
@@ -367,8 +379,9 @@ export const POLYGON_TOKENS = {
WETH: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
renBTC: '0xdbf31df14b66535af65aac99c32e9ea844e14501',
QUICK: '0x831753dd7087cac61ab5644b308642cc1c33dc13',
TITAN: '0xaaa5b9e6c589642f98a1cda99b9d024b8407285a',
IRON: '0xd86b5923f3ad7b585ed81b448170ae026c65ae9a',
DFYN: '0xc168e40227e4ebd8c1cae80f7a55a4f0e6d66c97',
BANANA: '0x5d47baba0d66083c52009271faf3f50dcc01023c',
WEXPOLY: '0x4c4bf319237d98a30a929a96112effa8da3510eb',
};
export const CURVE_POOLS = {
@@ -466,6 +479,14 @@ export const XSIGMA_POOLS = {
stable: '0x3333333ACdEdBbC9Ad7bda0876e60714195681c5',
};
export const FIREBIRDONESWAP_BSC_POOLS = {
oneswap: '0x01c9475dbd36e46d1961572c8de24b74616bae9e',
};
export const FIREBIRDONESWAP_POLYGON_POOLS = {
oneswap: '0x01c9475dbd36e46d1961572c8de24b74616bae9e',
};
export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
{
[ChainId.Mainnet]: [
@@ -476,12 +497,13 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
MAINNET_TOKENS.WBTC,
],
[ChainId.BSC]: [
'0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c', // WBNB
'0xe9e7cea3dedca5984780bafc599bd69add087d56', // BUSD
'0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3', // DAI
'0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', // USDC
'0x2170ed0880ac9a755fd29b2688956bd959f933f8', // ETH
'0x55d398326f99059ff775485246999027b3197955', // BUSD-T
BSC_TOKENS.WBNB,
BSC_TOKENS.BUSD,
BSC_TOKENS.DAI,
BSC_TOKENS.USDC,
BSC_TOKENS.WETH,
BSC_TOKENS.USDT,
BSC_TOKENS.WEX,
],
[ChainId.Ropsten]: [
getContractAddressesForChainOrThrow(ChainId.Ropsten).etherToken,
@@ -496,8 +518,9 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
POLYGON_TOKENS.USDT,
POLYGON_TOKENS.WBTC,
POLYGON_TOKENS.QUICK,
POLYGON_TOKENS.TITAN,
POLYGON_TOKENS.IRON,
POLYGON_TOKENS.DFYN,
POLYGON_TOKENS.BANANA,
POLYGON_TOKENS.WEXPOLY,
],
},
[],
@@ -883,7 +906,7 @@ export const XSIGMA_MAINNET_INFOS: { [name: string]: CurveInfo } = {
}),
};
// Curve pools like using custom selectors
// Curve-like sources using custom selectors
export const SADDLE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
[SADDLE_POOLS.stables]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
@@ -950,6 +973,30 @@ export const NERVE_BSC_INFOS: { [name: string]: CurveInfo } = {
},
};
export const FIREBIRDONESWAP_BSC_INFOS: { [name: string]: CurveInfo } = {
[FIREBIRDONESWAP_BSC_POOLS.oneswap]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
sellQuoteFunctionSelector: CurveFunctionSelectors.calculateSwap,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
poolAddress: FIREBIRDONESWAP_BSC_POOLS.oneswap,
tokens: [BSC_TOKENS.BUSD, BSC_TOKENS.USDT, BSC_TOKENS.DAI, BSC_TOKENS.USDC],
metaTokens: undefined,
gasSchedule: 100e3,
},
};
export const FIREBIRDONESWAP_POLYGON_INFOS: { [name: string]: CurveInfo } = {
[FIREBIRDONESWAP_POLYGON_POOLS.oneswap]: {
exchangeFunctionSelector: CurveFunctionSelectors.swap,
sellQuoteFunctionSelector: CurveFunctionSelectors.calculateSwap,
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
poolAddress: FIREBIRDONESWAP_POLYGON_POOLS.oneswap,
tokens: [POLYGON_TOKENS.DAI, POLYGON_TOKENS.USDC, POLYGON_TOKENS.USDT],
metaTokens: undefined,
gasSchedule: 100e3,
},
};
/**
* Kyber reserve prefixes
* 0xff Fed price reserve
@@ -1240,6 +1287,19 @@ export const BALANCER_V2_VAULT_ADDRESS_BY_CHAIN = valueByChainId<string>(
NULL_ADDRESS,
);
export const LIDO_INFO_BY_CHAIN = valueByChainId<LidoInfo>(
{
[ChainId.Mainnet]: {
stEthToken: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
wethToken: MAINNET_TOKENS.WETH,
},
},
{
stEthToken: NULL_ADDRESS,
wethToken: NULL_ADDRESS,
},
);
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;
@@ -1286,6 +1346,7 @@ export const BAKERYSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
export const APESWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.BSC]: '0xc0788a3ad43d79aa53b09c2eacc313a787d1d607',
[ChainId.Polygon]: '0xc0788a3ad43d79aa53b09c2eacc313a787d1d607',
},
NULL_ADDRESS,
);
@@ -1335,7 +1396,7 @@ export const DFYN_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
NULL_ADDRESS,
);
export const WAULT_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
export const WAULTSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.BSC]: '0xd48745e39bbed146eec15b79cbf964884f9877c2',
[ChainId.Polygon]: '0x3a1d87f206d12415f5b0a33e786967680aab4f6d',
@@ -1393,6 +1454,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.Smoothy]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.Saddle]: 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,
[ERC20BridgeSource.UniswapV2]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.SushiSwap]: uniswapV2CloneGasSchedule,
@@ -1451,6 +1513,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
}
return gas;
},
[ERC20BridgeSource.Lido]: () => 226e3,
//
// BSC

View File

@@ -19,6 +19,7 @@ import {
GenericRouterFillData,
KyberDmmFillData,
KyberFillData,
LidoFillData,
LiquidityProviderFillData,
MakerPsmFillData,
MooniswapFillData,
@@ -167,6 +168,10 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'WaultSwap');
case ERC20BridgeSource.Polydex:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'Polydex');
case ERC20BridgeSource.FirebirdOneSwap:
return encodeBridgeSourceId(BridgeProtocol.Nerve, 'FirebirdOneSwap');
case ERC20BridgeSource.Lido:
return encodeBridgeSourceId(BridgeProtocol.Lido, 'Lido');
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -198,6 +203,7 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
case ERC20BridgeSource.Smoothy:
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
const curveFillData = (order as OptimizedMarketBridgeOrder<CurveFillData>).fillData;
bridgeData = encoder.encode([
curveFillData.pool.poolAddress,
@@ -296,6 +302,10 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
kyberDmmFillData.tokenAddressPath,
]);
break;
case ERC20BridgeSource.Lido:
const lidoFillData = (order as OptimizedMarketBridgeOrder<LidoFillData>).fillData;
bridgeData = encoder.encode([lidoFillData.stEthTokenAddress]);
break;
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -410,6 +420,7 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.Smoothy]: curveEncoder,
[ERC20BridgeSource.Saddle]: curveEncoder,
[ERC20BridgeSource.XSigma]: curveEncoder,
[ERC20BridgeSource.FirebirdOneSwap]: curveEncoder,
// UniswapV2 like, (router, address[])
[ERC20BridgeSource.Bancor]: routerAddressPathEncoder,
[ERC20BridgeSource.UniswapV2]: routerAddressPathEncoder,
@@ -447,6 +458,7 @@ export const BRIDGE_ENCODERS: {
{ name: 'path', type: 'bytes' },
]),
[ERC20BridgeSource.KyberDmm]: AbiEncoder.create('(address,address[],address[])'),
[ERC20BridgeSource.Lido]: AbiEncoder.create('(address)'),
};
function getFillTokenAmounts(fill: CollapsedFill, side: MarketOperation): [BigNumber, BigNumber] {

View File

@@ -24,6 +24,7 @@ import {
DODOV2_FACTORIES_BY_CHAIN_ID,
KYBER_CONFIG_BY_CHAIN_ID,
KYBER_DMM_ROUTER_BY_CHAIN_ID,
LIDO_INFO_BY_CHAIN,
LINKSWAP_ROUTER_BY_CHAIN_ID,
LIQUIDITY_PROVIDER_REGISTRY_BY_CHAIN_ID,
MAINNET_TOKENS,
@@ -60,6 +61,8 @@ import {
KyberDmmFillData,
KyberFillData,
KyberSamplerOpts,
LidoFillData,
LidoInfo,
LiquidityProviderFillData,
LiquidityProviderRegistry,
MakerPsmFillData,
@@ -1059,6 +1062,42 @@ export class SamplerOperations {
});
}
public getLidoSellQuotes(
lidoInfo: LidoInfo,
makerToken: string,
takerToken: string,
takerFillAmounts: BigNumber[],
): SourceQuoteOperation<LidoFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.Lido,
fillData: {
takerToken,
stEthTokenAddress: lidoInfo.stEthToken,
},
contract: this._samplerContract,
function: this._samplerContract.sampleSellsFromLido,
params: [lidoInfo, takerToken, makerToken, takerFillAmounts],
});
}
public getLidoBuyQuotes(
lidoInfo: LidoInfo,
makerToken: string,
takerToken: string,
makerFillAmounts: BigNumber[],
): SourceQuoteOperation<LidoFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.Lido,
fillData: {
takerToken,
stEthTokenAddress: lidoInfo.stEthToken,
},
contract: this._samplerContract,
function: this._samplerContract.sampleBuysFromLido,
params: [lidoInfo, takerToken, makerToken, makerFillAmounts],
});
}
public getMedianSellRate(
sources: ERC20BridgeSource[],
makerToken: string,
@@ -1223,6 +1262,7 @@ export class SamplerOperations {
case ERC20BridgeSource.Ellipsis:
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
return getCurveLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getCurveSellQuotes(
pool,
@@ -1392,6 +1432,19 @@ export class SamplerOperations {
...intermediateTokens.map(t => [takerToken, t, makerToken]),
].map(path => this.getUniswapV3SellQuotes(router, quoter, path, takerFillAmounts));
}
case ERC20BridgeSource.Lido: {
const lidoInfo = LIDO_INFO_BY_CHAIN[this.chainId];
if (
lidoInfo.stEthToken === NULL_ADDRESS ||
lidoInfo.wethToken === NULL_ADDRESS ||
takerToken.toLowerCase() !== lidoInfo.wethToken.toLowerCase() ||
makerToken.toLowerCase() !== lidoInfo.stEthToken.toLowerCase()
) {
return [];
}
return this.getLidoSellQuotes(lidoInfo, makerToken, takerToken, takerFillAmounts);
}
default:
throw new Error(`Unsupported sell sample source: ${source}`);
}
@@ -1479,6 +1532,7 @@ export class SamplerOperations {
case ERC20BridgeSource.Ellipsis:
case ERC20BridgeSource.Saddle:
case ERC20BridgeSource.XSigma:
case ERC20BridgeSource.FirebirdOneSwap:
return getCurveLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getCurveBuyQuotes(
pool,
@@ -1642,6 +1696,20 @@ export class SamplerOperations {
...intermediateTokens.map(t => [takerToken, t, makerToken]),
].map(path => this.getUniswapV3BuyQuotes(router, quoter, path, makerFillAmounts));
}
case ERC20BridgeSource.Lido: {
const lidoInfo = LIDO_INFO_BY_CHAIN[this.chainId];
if (
lidoInfo.stEthToken === NULL_ADDRESS ||
lidoInfo.wethToken === NULL_ADDRESS ||
takerToken.toLowerCase() !== lidoInfo.wethToken.toLowerCase() ||
makerToken.toLowerCase() !== lidoInfo.stEthToken.toLowerCase()
) {
return [];
}
return this.getLidoBuyQuotes(lidoInfo, makerToken, takerToken, makerFillAmounts);
}
default:
throw new Error(`Unsupported buy sample source: ${source}`);
}

View File

@@ -67,6 +67,7 @@ export enum ERC20BridgeSource {
XSigma = 'xSigma',
UniswapV3 = 'Uniswap_V3',
CurveV2 = 'Curve_V2',
Lido = 'Lido',
// BSC only
PancakeSwap = 'PancakeSwap',
PancakeSwapV2 = 'PancakeSwap_V2',
@@ -84,6 +85,7 @@ export enum ERC20BridgeSource {
Dfyn = 'Dfyn',
WaultSwap = 'WaultSwap',
Polydex = 'Polydex',
FirebirdOneSwap = 'FirebirdOneSwap',
}
export type SourcesWithPoolsCache = ERC20BridgeSource.Balancer | ERC20BridgeSource.BalancerV2 | ERC20BridgeSource.Cream;
@@ -135,6 +137,14 @@ export interface PsmInfo {
gemTokenAddress: string;
}
/**
* Configuration for a Lido deployment
*/
export interface LidoInfo {
stEthToken: string;
wethToken: string;
}
/**
* Configuration info for a Balancer V2 pool.
*/
@@ -245,6 +255,11 @@ export interface FinalUniswapV3FillData extends Omit<UniswapV3FillData, 'uniswap
uniswapPath: string;
}
export interface LidoFillData extends FillData {
stEthTokenAddress: string;
takerToken: string;
}
/**
* Represents a node on a fill path.
*/

View File

@@ -31,6 +31,7 @@ import * as IUniswapExchangeQuotes from '../test/generated-artifacts/IUniswapExc
import * as IUniswapV2Router01 from '../test/generated-artifacts/IUniswapV2Router01.json';
import * as KyberDmmSampler from '../test/generated-artifacts/KyberDmmSampler.json';
import * as KyberSampler from '../test/generated-artifacts/KyberSampler.json';
import * as LidoSampler from '../test/generated-artifacts/LidoSampler.json';
import * as LiquidityProviderSampler from '../test/generated-artifacts/LiquidityProviderSampler.json';
import * as MakerPSMSampler from '../test/generated-artifacts/MakerPSMSampler.json';
import * as MooniswapSampler from '../test/generated-artifacts/MooniswapSampler.json';
@@ -61,6 +62,7 @@ export const artifacts = {
FakeTaker: FakeTaker as ContractArtifact,
KyberDmmSampler: KyberDmmSampler as ContractArtifact,
KyberSampler: KyberSampler as ContractArtifact,
LidoSampler: LidoSampler as ContractArtifact,
LiquidityProviderSampler: LiquidityProviderSampler as ContractArtifact,
MStableSampler: MStableSampler as ContractArtifact,
MakerPSMSampler: MakerPSMSampler as ContractArtifact,

View File

@@ -29,6 +29,7 @@ export * from '../test/generated-wrappers/i_uniswap_exchange_quotes';
export * from '../test/generated-wrappers/i_uniswap_v2_router01';
export * from '../test/generated-wrappers/kyber_dmm_sampler';
export * from '../test/generated-wrappers/kyber_sampler';
export * from '../test/generated-wrappers/lido_sampler';
export * from '../test/generated-wrappers/liquidity_provider_sampler';
export * from '../test/generated-wrappers/m_stable_sampler';
export * from '../test/generated-wrappers/maker_p_s_m_sampler';

View File

@@ -32,6 +32,7 @@
"test/generated-artifacts/IUniswapV2Router01.json",
"test/generated-artifacts/KyberDmmSampler.json",
"test/generated-artifacts/KyberSampler.json",
"test/generated-artifacts/LidoSampler.json",
"test/generated-artifacts/LiquidityProviderSampler.json",
"test/generated-artifacts/MStableSampler.json",
"test/generated-artifacts/MakerPSMSampler.json",

View File

@@ -1,4 +1,13 @@
[
{
"version": "6.4.0",
"changes": [
{
"note": "Deployed Lido FQT"
}
],
"timestamp": 1624356181
},
{
"timestamp": 1623382456,
"version": "6.3.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.4.0 - _June 22, 2021_
* Deployed Lido FQT
## v6.3.1 - _June 11, 2021_
* Dependencies updated

View File

@@ -36,7 +36,7 @@
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
"payTakerTransformer": "0x4638a7ebe75b911b995d0ec73a81e4f85f41f24e",
"affiliateFeeTransformer": "0xda6d9fc5998f550a094585cf9171f0e8ee3ac59f",
"fillQuoteTransformer": "0x75665d9a15a5212db8668bc3eb46fe09df8335af",
"fillQuoteTransformer": "0x6dfdb2537683ce6101f9090a78197dd58c30bfac",
"positiveSlippageFeeTransformer": "0xa9416ce1dbde8d331210c07b5c253d94ee4cc3fd"
}
},
@@ -77,7 +77,7 @@
"wethTransformer": "0x05ad19aa3826e0609a19568ffbd1dfe86c6c7184",
"payTakerTransformer": "0x6d0ebf2bcd9cc93ec553b60ad201943dcca4e291",
"affiliateFeeTransformer": "0x6588256778ca4432fa43983ac685c45efb2379e2",
"fillQuoteTransformer": "0xc7d935c79e4f01ed29e92950a158807b31f7b799",
"fillQuoteTransformer": "0xeca4b22f9005cd610c6a09e91fc3dd298a64837d",
"positiveSlippageFeeTransformer": "0x8b332f700fd37e71c5c5b26c4d78b5ca63dd33b2"
}
},

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers-test",
"version": "12.2.49",
"version": "12.2.50",
"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.1",
"@0x/contracts-test-utils": "^5.4.4",
"@0x/contract-wrappers": "^13.17.2",
"@0x/contracts-test-utils": "^5.4.5",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.10",
"@0x/order-utils": "^10.4.25",
"@0x/migrations": "^8.0.11",
"@0x/order-utils": "^10.4.26",
"@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": 1624356181,
"version": "13.17.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "13.17.1",

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.0.10",
"version": "8.0.11",
"engines": {
"node": ">=6.12"
},
@@ -68,20 +68,20 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.3.1",
"@0x/contracts-asset-proxy": "^3.7.15",
"@0x/contracts-coordinator": "^3.1.34",
"@0x/contracts-dev-utils": "^1.3.32",
"@0x/contracts-erc1155": "^2.1.33",
"@0x/contracts-erc20": "^3.3.12",
"@0x/contracts-erc721": "^3.1.33",
"@0x/contracts-exchange": "^3.2.34",
"@0x/contracts-exchange-forwarder": "^4.2.34",
"@0x/contracts-extensions": "^6.2.28",
"@0x/contracts-multisig": "^4.1.34",
"@0x/contracts-staking": "^2.0.41",
"@0x/contracts-utils": "^4.7.12",
"@0x/contracts-zero-ex": "^0.25.1",
"@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/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1624356181,
"version": "10.4.26",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "10.4.25",

View File

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

View File

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

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1624356181,
"version": "1.7.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1623382456,
"version": "1.7.1",

View File

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

View File

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

View File

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