Compare commits
4 Commits
@0x/contra
...
@0x/contra
Author | SHA1 | Date | |
---|---|---|---|
|
ec336b92aa | ||
|
62a530d7ec | ||
|
09d6fbce81 | ||
|
7f324dd75d |
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1692368658,
|
||||||
|
"version": "4.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1691617396,
|
"timestamp": 1691617396,
|
||||||
"version": "4.0.11",
|
"version": "4.0.11",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v4.0.12 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v4.0.11 - _August 9, 2023_
|
## v4.0.11 - _August 9, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-erc20",
|
"name": "@0x/contracts-erc20",
|
||||||
"version": "4.0.11",
|
"version": "4.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/protocol",
|
"homepage": "https://github.com/0xProject/protocol",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/contracts-utils": "^4.8.49",
|
"@0x/contracts-utils": "^4.8.50",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"typedoc": "~0.16.11"
|
"typedoc": "~0.16.11"
|
||||||
},
|
},
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1692368658,
|
||||||
|
"version": "5.4.58",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1691617396,
|
"timestamp": 1691617396,
|
||||||
"version": "5.4.57",
|
"version": "5.4.57",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v5.4.58 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v5.4.57 - _August 9, 2023_
|
## v5.4.57 - _August 9, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-test-utils",
|
"name": "@0x/contracts-test-utils",
|
||||||
"version": "5.4.57",
|
"version": "5.4.58",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.36",
|
"@0x/assert": "^3.0.36",
|
||||||
"@0x/base-contract": "^7.0.0",
|
"@0x/base-contract": "^7.0.0",
|
||||||
"@0x/contract-addresses": "^8.10.0",
|
"@0x/contract-addresses": "^8.11.0",
|
||||||
"@0x/dev-utils": "^5.0.2",
|
"@0x/dev-utils": "^5.0.2",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1692368658,
|
||||||
|
"version": "1.4.52",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1691617396,
|
"timestamp": 1691617396,
|
||||||
"version": "1.4.51",
|
"version": "1.4.51",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.4.52 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.4.51 - _August 9, 2023_
|
## v1.4.51 - _August 9, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-treasury",
|
"name": "@0x/contracts-treasury",
|
||||||
"version": "1.4.51",
|
"version": "1.4.52",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -46,12 +46,12 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.5",
|
"@0x/abi-gen": "^5.8.5",
|
||||||
"@0x/contract-addresses": "^8.10.0",
|
"@0x/contract-addresses": "^8.11.0",
|
||||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||||
"@0x/contracts-erc20": "3.3.57",
|
"@0x/contracts-erc20": "3.3.57",
|
||||||
"@0x/contracts-gen": "^2.0.50",
|
"@0x/contracts-gen": "^2.0.50",
|
||||||
"@0x/contracts-staking": "^2.0.45",
|
"@0x/contracts-staking": "^2.0.45",
|
||||||
"@0x/contracts-test-utils": "^5.4.57",
|
"@0x/contracts-test-utils": "^5.4.58",
|
||||||
"@0x/sol-compiler": "^4.8.2",
|
"@0x/sol-compiler": "^4.8.2",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"@types/isomorphic-fetch": "^0.0.35",
|
"@types/isomorphic-fetch": "^0.0.35",
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^7.0.0",
|
"@0x/base-contract": "^7.0.0",
|
||||||
"@0x/protocol-utils": "^11.23.0",
|
"@0x/protocol-utils": "^11.24.0",
|
||||||
"@0x/subproviders": "^8.0.1",
|
"@0x/subproviders": "^8.0.1",
|
||||||
"@0x/types": "^3.3.7",
|
"@0x/types": "^3.3.7",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1692368658,
|
||||||
|
"version": "4.8.50",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1691617396,
|
"timestamp": 1691617396,
|
||||||
"version": "4.8.49",
|
"version": "4.8.49",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v4.8.50 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v4.8.49 - _August 9, 2023_
|
## v4.8.49 - _August 9, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-utils",
|
"name": "@0x/contracts-utils",
|
||||||
"version": "4.8.49",
|
"version": "4.8.50",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.5",
|
"@0x/abi-gen": "^5.8.5",
|
||||||
"@0x/contracts-gen": "^2.0.50",
|
"@0x/contracts-gen": "^2.0.50",
|
||||||
"@0x/contracts-test-utils": "^5.4.57",
|
"@0x/contracts-test-utils": "^5.4.58",
|
||||||
"@0x/dev-utils": "^5.0.2",
|
"@0x/dev-utils": "^5.0.2",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.8.2",
|
"@0x/sol-compiler": "^4.8.2",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "0.47.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1692368658
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.46.0",
|
"version": "0.46.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v0.47.0 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||||
|
|
||||||
## v0.46.0 - _August 9, 2023_
|
## v0.46.0 - _August 9, 2023_
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
* Add VelodromeV2 support on Optimism
|
||||||
|
@@ -22,6 +22,7 @@ import "./mixins/MixinDodo.sol";
|
|||||||
import "./mixins/MixinDodoV2.sol";
|
import "./mixins/MixinDodoV2.sol";
|
||||||
import "./mixins/MixinKyberDmm.sol";
|
import "./mixins/MixinKyberDmm.sol";
|
||||||
import "./mixins/MixinKyberElastic.sol";
|
import "./mixins/MixinKyberElastic.sol";
|
||||||
|
import "./mixins/MixinMaverickV1.sol";
|
||||||
import "./mixins/MixinMooniswap.sol";
|
import "./mixins/MixinMooniswap.sol";
|
||||||
import "./mixins/MixinNerve.sol";
|
import "./mixins/MixinNerve.sol";
|
||||||
import "./mixins/MixinUniswapV2.sol";
|
import "./mixins/MixinUniswapV2.sol";
|
||||||
@@ -36,6 +37,7 @@ contract BSCBridgeAdapter is
|
|||||||
MixinDodoV2,
|
MixinDodoV2,
|
||||||
MixinKyberDmm,
|
MixinKyberDmm,
|
||||||
MixinKyberElastic,
|
MixinKyberElastic,
|
||||||
|
MixinMaverickV1,
|
||||||
MixinMooniswap,
|
MixinMooniswap,
|
||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinUniswapV2,
|
MixinUniswapV2,
|
||||||
@@ -103,6 +105,11 @@ contract BSCBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeWOOFi(sellToken, buyToken, sellAmount, order.bridgeData);
|
boughtAmount = _tradeWOOFi(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||||
|
} else if (protocolId == BridgeProtocols.MAVERICKV1) {
|
||||||
|
if (dryRun) {
|
||||||
|
return (0, true);
|
||||||
|
}
|
||||||
|
boughtAmount = _tradeMaverickV1(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||||
} else if (protocolId == BridgeProtocols.UNKNOWN) {
|
} else if (protocolId == BridgeProtocols.UNKNOWN) {
|
||||||
if (dryRun) {
|
if (dryRun) {
|
||||||
return (0, true);
|
return (0, true);
|
||||||
|
@@ -22,6 +22,7 @@ import "./mixins/MixinUniswapV2.sol";
|
|||||||
import "./mixins/MixinBalancerV2Batch.sol";
|
import "./mixins/MixinBalancerV2Batch.sol";
|
||||||
import "./mixins/MixinCurve.sol";
|
import "./mixins/MixinCurve.sol";
|
||||||
import "./mixins/MixinCurveV2.sol";
|
import "./mixins/MixinCurveV2.sol";
|
||||||
|
import "./mixins/MixinMaverickV1.sol";
|
||||||
import "./mixins/MixinSolidly.sol";
|
import "./mixins/MixinSolidly.sol";
|
||||||
|
|
||||||
contract BaseBridgeAdapter is
|
contract BaseBridgeAdapter is
|
||||||
@@ -31,6 +32,7 @@ contract BaseBridgeAdapter is
|
|||||||
MixinBalancerV2Batch,
|
MixinBalancerV2Batch,
|
||||||
MixinCurve,
|
MixinCurve,
|
||||||
MixinCurveV2,
|
MixinCurveV2,
|
||||||
|
MixinMaverickV1,
|
||||||
MixinSolidly
|
MixinSolidly
|
||||||
{
|
{
|
||||||
constructor(IEtherToken weth) public MixinCurve(weth) {}
|
constructor(IEtherToken weth) public MixinCurve(weth) {}
|
||||||
@@ -73,6 +75,11 @@ contract BaseBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeBalancerV2Batch(sellAmount, order.bridgeData);
|
boughtAmount = _tradeBalancerV2Batch(sellAmount, order.bridgeData);
|
||||||
|
} else if (protocolId == BridgeProtocols.MAVERICKV1) {
|
||||||
|
if (dryRun) {
|
||||||
|
return (0, true);
|
||||||
|
}
|
||||||
|
boughtAmount = _tradeMaverickV1(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||||
}
|
}
|
||||||
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
||||||
}
|
}
|
||||||
|
@@ -58,4 +58,5 @@ library BridgeProtocols {
|
|||||||
uint128 internal constant BARTER = 34;
|
uint128 internal constant BARTER = 34;
|
||||||
uint128 internal constant TRADERJOEV2 = 35;
|
uint128 internal constant TRADERJOEV2 = 35;
|
||||||
uint128 internal constant VELODROMEV2 = 36;
|
uint128 internal constant VELODROMEV2 = 36;
|
||||||
|
uint128 internal constant MAVERICKV1 = 37;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import "./mixins/MixinKyberDmm.sol";
|
|||||||
import "./mixins/MixinKyberElastic.sol";
|
import "./mixins/MixinKyberElastic.sol";
|
||||||
import "./mixins/MixinLido.sol";
|
import "./mixins/MixinLido.sol";
|
||||||
import "./mixins/MixinMakerPSM.sol";
|
import "./mixins/MixinMakerPSM.sol";
|
||||||
|
import "./mixins/MixinMaverickV1.sol";
|
||||||
import "./mixins/MixinNerve.sol";
|
import "./mixins/MixinNerve.sol";
|
||||||
import "./mixins/MixinSynthetix.sol";
|
import "./mixins/MixinSynthetix.sol";
|
||||||
import "./mixins/MixinUniswap.sol";
|
import "./mixins/MixinUniswap.sol";
|
||||||
@@ -56,6 +57,7 @@ contract EthereumBridgeAdapter is
|
|||||||
MixinKyberElastic,
|
MixinKyberElastic,
|
||||||
MixinLido,
|
MixinLido,
|
||||||
MixinMakerPSM,
|
MixinMakerPSM,
|
||||||
|
MixinMaverickV1,
|
||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinSynthetix,
|
MixinSynthetix,
|
||||||
MixinUniswap,
|
MixinUniswap,
|
||||||
@@ -175,6 +177,11 @@ contract EthereumBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeBarter(sellToken, sellAmount, order.bridgeData);
|
boughtAmount = _tradeBarter(sellToken, sellAmount, order.bridgeData);
|
||||||
|
} else if (protocolId == BridgeProtocols.MAVERICKV1) {
|
||||||
|
if (dryRun) {
|
||||||
|
return (0, true);
|
||||||
|
}
|
||||||
|
boughtAmount = _tradeMaverickV1(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||||
} else if (protocolId == BridgeProtocols.UNKNOWN) {
|
} else if (protocolId == BridgeProtocols.UNKNOWN) {
|
||||||
if (dryRun) {
|
if (dryRun) {
|
||||||
return (0, true);
|
return (0, true);
|
||||||
|
@@ -0,0 +1,63 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
Copyright 2023 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/src/v06/LibERC20TokenV06.sol";
|
||||||
|
import "@0x/contracts-erc20/src/IERC20Token.sol";
|
||||||
|
|
||||||
|
interface IMaverickV1Router {
|
||||||
|
struct ExactInputSingleParams {
|
||||||
|
address tokenIn;
|
||||||
|
address tokenOut;
|
||||||
|
address pool;
|
||||||
|
address recipient;
|
||||||
|
uint256 deadline;
|
||||||
|
uint256 amountIn;
|
||||||
|
uint256 amountOutMinimum;
|
||||||
|
uint256 sqrtPriceLimitD18;
|
||||||
|
}
|
||||||
|
|
||||||
|
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
contract MixinMaverickV1 {
|
||||||
|
using LibERC20TokenV06 for IERC20Token;
|
||||||
|
|
||||||
|
function _tradeMaverickV1(
|
||||||
|
IERC20Token sellToken,
|
||||||
|
IERC20Token buyToken,
|
||||||
|
uint256 sellAmount,
|
||||||
|
bytes memory bridgeData
|
||||||
|
) internal returns (uint256 boughtAmount) {
|
||||||
|
(IMaverickV1Router router, address pool) = abi.decode(bridgeData, (IMaverickV1Router, address));
|
||||||
|
|
||||||
|
// Grant the MaverickV1 router an allowance to sell the sellToken
|
||||||
|
sellToken.approveIfBelow(address(router), sellAmount);
|
||||||
|
|
||||||
|
boughtAmount = router.exactInputSingle(
|
||||||
|
IMaverickV1Router.ExactInputSingleParams({
|
||||||
|
tokenIn: address(sellToken),
|
||||||
|
tokenOut: address(buyToken),
|
||||||
|
pool: pool,
|
||||||
|
recipient: address(this),
|
||||||
|
deadline: block.timestamp,
|
||||||
|
amountIn: sellAmount,
|
||||||
|
amountOutMinimum: 1,
|
||||||
|
sqrtPriceLimitD18: 0
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-zero-ex",
|
"name": "@0x/contracts-zero-ex",
|
||||||
"version": "0.46.0",
|
"version": "0.47.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -51,10 +51,10 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.8.5",
|
"@0x/abi-gen": "^5.8.5",
|
||||||
"@0x/contract-addresses": "^8.10.0",
|
"@0x/contract-addresses": "^8.11.0",
|
||||||
"@0x/contracts-erc20": "^3.3.57",
|
"@0x/contracts-erc20": "^3.3.57",
|
||||||
"@0x/contracts-gen": "^2.0.50",
|
"@0x/contracts-gen": "^2.0.50",
|
||||||
"@0x/contracts-test-utils": "^5.4.57",
|
"@0x/contracts-test-utils": "^5.4.58",
|
||||||
"@0x/dev-utils": "^5.0.2",
|
"@0x/dev-utils": "^5.0.2",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.8.2",
|
"@0x/sol-compiler": "^4.8.2",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^7.0.0",
|
"@0x/base-contract": "^7.0.0",
|
||||||
"@0x/protocol-utils": "^11.23.0",
|
"@0x/protocol-utils": "^11.24.0",
|
||||||
"@0x/subproviders": "^8.0.1",
|
"@0x/subproviders": "^8.0.1",
|
||||||
"@0x/types": "^3.3.7",
|
"@0x/types": "^3.3.7",
|
||||||
"@0x/typescript-typings": "^5.3.1",
|
"@0x/typescript-typings": "^5.3.1",
|
||||||
|
@@ -32,4 +32,8 @@ contract BSCBridgeAdapterTest is Test {
|
|||||||
function testSupportsUniswapV3() public {
|
function testSupportsUniswapV3() public {
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testSupportMaverickV1() public {
|
||||||
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,39 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
Copyright 2023 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 "forge-std/Test.sol";
|
||||||
|
import "../../../contracts/src/transformers/bridges/BaseBridgeAdapter.sol";
|
||||||
|
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
|
||||||
|
|
||||||
|
contract BaseBridgeAdapterTest is Test {
|
||||||
|
address constant WETH = 0x4200000000000000000000000000000000000006;
|
||||||
|
|
||||||
|
BaseBridgeAdapter private adapter;
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
vm.chainId(8453);
|
||||||
|
adapter = new BaseBridgeAdapter(IEtherToken(WETH));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testSupportsUniswapV3() public {
|
||||||
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testSupportMaverickV1() public {
|
||||||
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
/*
|
||||||
|
Copyright 2023 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 "forge-std/Test.sol";
|
||||||
|
import "../../../contracts/src/transformers/bridges/EthereumBridgeAdapter.sol";
|
||||||
|
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
|
||||||
|
|
||||||
|
contract EthereumBridgeAdapterTest is Test {
|
||||||
|
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
|
||||||
|
|
||||||
|
EthereumBridgeAdapter private adapter;
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
vm.chainId(1);
|
||||||
|
adapter = new EthereumBridgeAdapter(IEtherToken(WETH));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testSupportsUniswapV3() public {
|
||||||
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
||||||
|
}
|
||||||
|
|
||||||
|
function testSupportMaverickV1() public {
|
||||||
|
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "8.11.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1692368658
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "8.10.0",
|
"version": "8.10.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -6,6 +6,9 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v8.11.0 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||||
## v8.10.0 - _August 9, 2023_
|
## v8.10.0 - _August 9, 2023_
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
* Add VelodromeV2 support on Optimism
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
|
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
|
||||||
"payTakerTransformer": "0xea500d073652336a58846ada15c25f2c6d2d241f",
|
"payTakerTransformer": "0xea500d073652336a58846ada15c25f2c6d2d241f",
|
||||||
"affiliateFeeTransformer": "0x8146cbbe327364b13d0699f2ced39c637f92501a",
|
"affiliateFeeTransformer": "0x8146cbbe327364b13d0699f2ced39c637f92501a",
|
||||||
"fillQuoteTransformer": "0x21c3bee93fad436dedd29f971dc4fdf82f3e3a3a",
|
"fillQuoteTransformer": "0x2fd08c1f9fc8406c1d7e3a799a13883a7e7949f0",
|
||||||
"positiveSlippageFeeTransformer": "0x818a4a855bfeb16c305cb65e8d4fb239a308bc48"
|
"positiveSlippageFeeTransformer": "0x818a4a855bfeb16c305cb65e8d4fb239a308bc48"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
||||||
"payTakerTransformer": "0x7e788f3a3e39cdd1944ba111fafc5fb7e59b5e90",
|
"payTakerTransformer": "0x7e788f3a3e39cdd1944ba111fafc5fb7e59b5e90",
|
||||||
"affiliateFeeTransformer": "0x043300d113de0c64684ab89c56a45cd94c7ef54c",
|
"affiliateFeeTransformer": "0x043300d113de0c64684ab89c56a45cd94c7ef54c",
|
||||||
"fillQuoteTransformer": "0xa9c57c539690d4e1439411f648ead5b121b34a23",
|
"fillQuoteTransformer": "0x6073f12fc63bcc64bd4fed5d44aa1035e37d68ee",
|
||||||
"positiveSlippageFeeTransformer": "0x6ff35e8cbaf56d8a8f6bf9963b902a4576243030"
|
"positiveSlippageFeeTransformer": "0x6ff35e8cbaf56d8a8f6bf9963b902a4576243030"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
"wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
"wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
||||||
"payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
"payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
||||||
"affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066",
|
"affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066",
|
||||||
"fillQuoteTransformer": "0x98b159db76c820dc877782f199e287a97420b1d2",
|
"fillQuoteTransformer": "0xab93d03a3e7e51ec5edaef75d27f20917da4c18e",
|
||||||
"positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e"
|
"positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-addresses",
|
"name": "@0x/contract-addresses",
|
||||||
"version": "8.10.0",
|
"version": "8.11.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1692368658,
|
||||||
|
"version": "13.23.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1691617396,
|
"timestamp": 1691617396,
|
||||||
"version": "13.23.5",
|
"version": "13.23.5",
|
||||||
|
@@ -6,6 +6,9 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v13.23.6 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
## v13.23.5 - _August 9, 2023_
|
## v13.23.5 - _August 9, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-wrappers",
|
"name": "@0x/contract-wrappers",
|
||||||
"version": "13.23.5",
|
"version": "13.23.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.36",
|
"@0x/assert": "^3.0.36",
|
||||||
"@0x/base-contract": "^7.0.0",
|
"@0x/base-contract": "^7.0.0",
|
||||||
"@0x/contract-addresses": "^8.10.0",
|
"@0x/contract-addresses": "^8.11.0",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/types": "^3.3.7",
|
"@0x/types": "^3.3.7",
|
||||||
"@0x/utils": "^7.0.0",
|
"@0x/utils": "^7.0.0",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "11.24.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1692368658
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "11.23.0",
|
"version": "11.23.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -6,6 +6,9 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v11.24.0 - _August 18, 2023_
|
||||||
|
|
||||||
|
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||||
## v11.23.0 - _August 9, 2023_
|
## v11.23.0 - _August 9, 2023_
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
* Add VelodromeV2 support on Optimism
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/protocol-utils",
|
"name": "@0x/protocol-utils",
|
||||||
"version": "11.23.0",
|
"version": "11.24.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.36",
|
"@0x/assert": "^3.0.36",
|
||||||
"@0x/contract-addresses": "^8.10.0",
|
"@0x/contract-addresses": "^8.11.0",
|
||||||
"@0x/contract-wrappers": "^13.23.5",
|
"@0x/contract-wrappers": "^13.23.6",
|
||||||
"@0x/json-schemas": "^6.4.4",
|
"@0x/json-schemas": "^6.4.4",
|
||||||
"@0x/subproviders": "^8.0.1",
|
"@0x/subproviders": "^8.0.1",
|
||||||
"@0x/utils": "^7.0.0",
|
"@0x/utils": "^7.0.0",
|
||||||
|
@@ -167,6 +167,7 @@ export enum BridgeProtocol {
|
|||||||
Barter,
|
Barter,
|
||||||
TraderJoeV2,
|
TraderJoeV2,
|
||||||
VelodromeV2,
|
VelodromeV2,
|
||||||
|
MaverickV1,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user