Compare commits

...

10 Commits

Author SHA1 Message Date
Github Actions
bb4a9c656c Publish
- @0x/contracts-erc20@3.3.23
 - @0x/contracts-test-utils@5.4.14
 - @0x/contracts-treasury@1.4.6
 - @0x/contracts-utils@4.8.4
 - @0x/contracts-zero-ex@0.29.5
 - @0x/asset-swapper@16.34.0
 - @0x/contract-addresses@6.9.0
 - @0x/contract-wrappers@13.18.3
 - @0x/migrations@8.1.12
 - @0x/protocol-utils@1.9.5
2021-11-16 22:49:46 +00:00
Github Actions
6ab07b6304 Updated CHANGELOGS & MD docs 2021-11-16 22:49:43 +00:00
Noah Khamliche
8903f1ab01 Update packages/contract-addresses/CHANGELOG.json
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2021-11-16 16:55:57 -05:00
Noah Khamliche
415535612a removed duplicate celo code 2021-11-16 16:55:57 -05:00
Noah Khamliche
5248a135c3 upped versions in changelog 2021-11-16 16:55:57 -05:00
Lawrence Forman
602290925c fix celo rebase 2021-11-16 16:55:57 -05:00
Github Actions
01813746e8 Publish
- @0x/contracts-zero-ex@0.29.4
 - @0x/asset-swapper@16.33.0
 - @0x/migrations@8.1.11
2021-11-16 12:27:06 +00:00
Github Actions
7d668d8801 Updated CHANGELOGS & MD docs 2021-11-16 12:27:02 +00:00
Jacob Evans
797a00a33a feat: Uniswap V3 1bps pools [TKR-263] (#366)
* feat: Uniswap V3 1bps pools

* Update CHANGELOG
2021-11-16 08:15:24 +10:00
Lawrence Forman
4b3d98f43c @0x/contracts-zero-ex: Prevent EP ETH balance from reducing when executin mtxs (#365)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-11-09 22:11:36 -05:00
42 changed files with 372 additions and 90 deletions

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "3.3.23",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "3.3.22",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.3.23 - _November 16, 2021_
* Dependencies updated
## v3.3.22 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "3.3.22",
"version": "3.3.23",
"engines": {
"node": ">=6.12"
},
@@ -53,8 +53,8 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.2",
"@0x/contracts-gen": "^2.0.40",
"@0x/contracts-test-utils": "^5.4.13",
"@0x/contracts-utils": "^4.8.3",
"@0x/contracts-test-utils": "^5.4.14",
"@0x/contracts-utils": "^4.8.4",
"@0x/dev-utils": "^4.2.9",
"@0x/sol-compiler": "^4.7.5",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "5.4.14",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "5.4.13",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v5.4.14 - _November 16, 2021_
* Dependencies updated
## v5.4.13 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
"version": "5.4.13",
"version": "5.4.14",
"engines": {
"node": ">=6.12"
},
@@ -44,7 +44,7 @@
"dependencies": {
"@0x/assert": "^3.0.29",
"@0x/base-contract": "^6.4.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-addresses": "^6.9.0",
"@0x/dev-utils": "^4.2.9",
"@0x/json-schemas": "^6.3.0",
"@0x/order-utils": "^10.4.28",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "1.4.6",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "1.4.5",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.4.6 - _November 16, 2021_
* Dependencies updated
## v1.4.5 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-treasury",
"version": "1.4.5",
"version": "1.4.6",
"engines": {
"node": ">=6.12"
},
@@ -47,12 +47,12 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
"devDependencies": {
"@0x/abi-gen": "^5.6.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-addresses": "^6.9.0",
"@0x/contracts-asset-proxy": "^3.7.19",
"@0x/contracts-erc20": "^3.3.22",
"@0x/contracts-erc20": "^3.3.23",
"@0x/contracts-gen": "^2.0.40",
"@0x/contracts-staking": "^2.0.45",
"@0x/contracts-test-utils": "^5.4.13",
"@0x/contracts-test-utils": "^5.4.14",
"@0x/sol-compiler": "^4.7.5",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -73,7 +73,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.2",
"@0x/protocol-utils": "^1.9.4",
"@0x/protocol-utils": "^1.9.5",
"@0x/subproviders": "^6.6.0",
"@0x/types": "^3.3.4",
"@0x/typescript-typings": "^5.2.1",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "4.8.4",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "4.8.3",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.8.4 - _November 16, 2021_
* Dependencies updated
## v4.8.3 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "4.8.3",
"version": "4.8.4",
"engines": {
"node": ">=6.12"
},
@@ -52,7 +52,7 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.2",
"@0x/contracts-gen": "^2.0.40",
"@0x/contracts-test-utils": "^5.4.13",
"@0x/contracts-test-utils": "^5.4.14",
"@0x/dev-utils": "^4.2.9",
"@0x/order-utils": "^10.4.28",
"@0x/sol-compiler": "^4.7.5",

View File

@@ -1,4 +1,23 @@
[
{
"timestamp": 1637102971,
"version": "0.29.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.29.4",
"changes": [
{
"note": "Prevent EP ETH balance from reducing when executin mtxs",
"pr": 365
}
],
"timestamp": 1637065617
},
{
"version": "0.29.3",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.29.5 - _November 16, 2021_
* Dependencies updated
## v0.29.4 - _November 16, 2021_
* Prevent EP ETH balance from reducing when executin mtxs (#365)
## v0.29.3 - _November 3, 2021_
* Register transformERC20() and remove transformERC20Staging() (#355)

View File

@@ -78,7 +78,7 @@ contract MetaTransactionsFeature is
/// @dev Name of this feature.
string public constant override FEATURE_NAME = "MetaTransactions";
/// @dev Version of this feature.
uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 2, 0);
uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 2, 1);
/// @dev EIP712 typehash of the `MetaTransactionData` struct.
bytes32 public immutable MTX_EIP712_TYPEHASH = keccak256(
"MetaTransactionData("
@@ -105,6 +105,17 @@ contract MetaTransactionsFeature is
}
}
/// @dev Ensures that the ETH balance of `this` does not go below the
/// initial ETH balance before the call (excluding ETH attached to the call).
modifier doesNotReduceEthBalance() {
uint256 initialBalance = address(this).balance - msg.value;
_;
require(
initialBalance <= address(this).balance,
"MetaTransactionsFeature/ETH_LEAK"
);
}
constructor(address zeroExAddress)
public
FixinCommon()
@@ -140,6 +151,7 @@ contract MetaTransactionsFeature is
payable
override
nonReentrant(REENTRANCY_MTX)
doesNotReduceEthBalance
refundsAttachedEth
returns (bytes memory returnResult)
{
@@ -164,6 +176,7 @@ contract MetaTransactionsFeature is
payable
override
nonReentrant(REENTRANCY_MTX)
doesNotReduceEthBalance
refundsAttachedEth
returns (bytes[] memory returnResults)
{

View File

@@ -46,6 +46,10 @@ contract TestMetaTransactionsTransformERC20Feature is
payable
returns (uint256 outputTokenAmount)
{
if (msg.value == 555) {
tx.origin.transfer(1);
}
if (msg.value == 666) {
revert('FAIL');
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.29.3",
"version": "0.29.5",
"engines": {
"node": ">=6.12"
},
@@ -56,10 +56,10 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
"devDependencies": {
"@0x/abi-gen": "^5.6.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contracts-erc20": "^3.3.22",
"@0x/contract-addresses": "^6.9.0",
"@0x/contracts-erc20": "^3.3.23",
"@0x/contracts-gen": "^2.0.40",
"@0x/contracts-test-utils": "^5.4.13",
"@0x/contracts-test-utils": "^5.4.14",
"@0x/dev-utils": "^4.2.9",
"@0x/order-utils": "^10.4.28",
"@0x/sol-compiler": "^4.7.5",
@@ -83,7 +83,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.2",
"@0x/protocol-utils": "^1.9.4",
"@0x/protocol-utils": "^1.9.5",
"@0x/subproviders": "^6.6.0",
"@0x/types": "^3.3.4",
"@0x/typescript-typings": "^5.2.1",

View File

@@ -38,6 +38,7 @@ blockchainTests.resets('MetaTransactions feature', env => {
let nativeOrdersFeature: TestMetaTransactionsNativeOrdersFeatureContract;
const MAX_FEE_AMOUNT = new BigNumber('1e18');
const TRANSFORM_ERC20_ONE_WEI_VALUE = new BigNumber(555);
const TRANSFORM_ERC20_FAILING_VALUE = new BigNumber(666);
const TRANSFORM_ERC20_REENTER_VALUE = new BigNumber(777);
const TRANSFORM_ERC20_BATCH_REENTER_VALUE = new BigNumber(888);
@@ -597,7 +598,7 @@ blockchainTests.resets('MetaTransactions feature', env => {
);
});
it('cannot reenter `executeMetaTransaction()`', async () => {
it('cannot reduce initial ETH balance', async () => {
const args = getRandomTransformERC20Args();
const mtx = getRandomMetaTransaction({
callData: transformERC20Feature
@@ -609,58 +610,23 @@ blockchainTests.resets('MetaTransactions feature', env => {
args.transformations,
)
.getABIEncodedTransactionData(),
value: TRANSFORM_ERC20_REENTER_VALUE,
value: TRANSFORM_ERC20_ONE_WEI_VALUE,
});
const mtxHash = mtx.getHash();
const signature = await mtx.getSignatureWithProviderAsync(env.provider);
const callOpts = {
gasPrice: mtx.maxGasPrice,
value: mtx.value,
};
const tx = feature.executeMetaTransaction(mtx, signature).awaitTransactionSuccessAsync(callOpts);
return expect(tx).to.revertWith(
new ZeroExRevertErrors.MetaTransactions.MetaTransactionCallFailedError(
mtxHash,
undefined,
new ZeroExRevertErrors.Common.IllegalReentrancyError(
feature.getSelector('executeMetaTransaction'),
REENTRANCY_FLAG_MTX,
).encode(),
),
// Send pre-existing ETH to the EP.
await env.web3Wrapper.awaitTransactionSuccessAsync(
await env.web3Wrapper.sendTransactionAsync({
from: owner,
to: zeroEx.address,
value: new BigNumber(1),
}),
);
});
it('cannot reenter `batchExecuteMetaTransactions()`', async () => {
const args = getRandomTransformERC20Args();
const mtx = getRandomMetaTransaction({
callData: transformERC20Feature
.transformERC20(
args.inputToken,
args.outputToken,
args.inputTokenAmount,
args.minOutputTokenAmount,
args.transformations,
)
.getABIEncodedTransactionData(),
value: TRANSFORM_ERC20_BATCH_REENTER_VALUE,
});
const mtxHash = mtx.getHash();
const signature = await mtx.getSignatureWithProviderAsync(env.provider);
const callOpts = {
gasPrice: mtx.maxGasPrice,
value: mtx.value,
};
const tx = feature.executeMetaTransaction(mtx, signature).awaitTransactionSuccessAsync(callOpts);
return expect(tx).to.revertWith(
new ZeroExRevertErrors.MetaTransactions.MetaTransactionCallFailedError(
mtxHash,
undefined,
new ZeroExRevertErrors.Common.IllegalReentrancyError(
feature.getSelector('batchExecuteMetaTransactions'),
REENTRANCY_FLAG_MTX,
).encode(),
),
);
return expect(tx).to.revertWith('MetaTransactionsFeature/ETH_LEAK');
});
});
@@ -817,6 +783,37 @@ blockchainTests.resets('MetaTransactions feature', env => {
),
);
});
it('cannot reduce initial ETH balance', async () => {
const args = getRandomTransformERC20Args();
const mtx = getRandomMetaTransaction({
callData: transformERC20Feature
.transformERC20(
args.inputToken,
args.outputToken,
args.inputTokenAmount,
args.minOutputTokenAmount,
args.transformations,
)
.getABIEncodedTransactionData(),
value: TRANSFORM_ERC20_ONE_WEI_VALUE,
});
const signature = await mtx.getSignatureWithProviderAsync(env.provider);
const callOpts = {
gasPrice: mtx.maxGasPrice,
value: mtx.value,
};
// Send pre-existing ETH to the EP.
await env.web3Wrapper.awaitTransactionSuccessAsync(
await env.web3Wrapper.sendTransactionAsync({
from: owner,
to: zeroEx.address,
value: new BigNumber(1),
}),
);
const tx = feature.batchExecuteMetaTransactions([mtx], [signature]).awaitTransactionSuccessAsync(callOpts);
return expect(tx).to.revertWith('MetaTransactionsFeature/ETH_LEAK');
});
});
describe('getMetaTransactionExecutedBlock()', () => {

View File

@@ -1,4 +1,24 @@
[
{
"version": "16.34.0",
"changes": [
{
"note": "Add support Celo",
"pr": 367
}
],
"timestamp": 1637102971
},
{
"version": "16.33.0",
"changes": [
{
"note": "Add support for Uniswap V3 1 bps pools",
"pr": 366
}
],
"timestamp": 1637065617
},
{
"version": "16.32.0",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v16.34.0 - _November 16, 2021_
* Add support Celo (#367)
## v16.33.0 - _November 16, 2021_
* Add support for Uniswap V3 1 bps pools (#366)
## v16.32.0 - _November 9, 2021_
* Extended Quote Report (#361)

View File

@@ -174,8 +174,9 @@ contract UniswapV3Sampler
tokenPath.length - startIndex >= 2,
"UniswapV3Sampler/tokenPath too short"
);
uint24[3] memory validPoolFees = [
uint24[4] memory validPoolFees = [
// The launch pool fees. Could get hairier if they add more.
uint24(0.0001e6),
uint24(0.0005e6),
uint24(0.003e6),
uint24(0.01e6)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "16.32.0",
"version": "16.34.0",
"engines": {
"node": ">=6.12"
},
@@ -60,14 +60,14 @@
"dependencies": {
"@0x/assert": "^3.0.29",
"@0x/base-contract": "^6.4.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-wrappers": "^13.18.2",
"@0x/contracts-erc20": "^3.3.22",
"@0x/contracts-zero-ex": "^0.29.3",
"@0x/contract-addresses": "^6.9.0",
"@0x/contract-wrappers": "^13.18.3",
"@0x/contracts-erc20": "^3.3.23",
"@0x/contracts-zero-ex": "^0.29.5",
"@0x/dev-utils": "^4.2.9",
"@0x/json-schemas": "^6.3.0",
"@0x/neon-router": "^0.2.1",
"@0x/protocol-utils": "^1.9.4",
"@0x/protocol-utils": "^1.9.5",
"@0x/quote-server": "^6.0.6",
"@0x/types": "^3.3.4",
"@0x/typescript-typings": "^5.2.1",
@@ -98,10 +98,10 @@
"@0x/contracts-exchange": "^3.2.38",
"@0x/contracts-exchange-libs": "^4.3.37",
"@0x/contracts-gen": "^2.0.40",
"@0x/contracts-test-utils": "^5.4.13",
"@0x/contracts-utils": "^4.8.3",
"@0x/contracts-test-utils": "^5.4.14",
"@0x/contracts-utils": "^4.8.4",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.1.10",
"@0x/migrations": "^8.1.12",
"@0x/sol-compiler": "^4.7.5",
"@0x/subproviders": "^6.6.0",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -360,8 +360,9 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
// Build up the transforms.
const transforms = [];
if (isFromETH) {
// Create a WETH wrapper if coming from ETH.
// Create a WETH wrapper if coming from ETH.
// Dont add the wethTransformer to CELO. There is no wrap/unwrap logic for CELO.
if (isFromETH && this.chainId !== ChainId.Celo) {
transforms.push({
deploymentNonce: this.transformerNonces.wethTransformer,
data: encodeWethTransformerData({
@@ -413,9 +414,9 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
}),
});
}
if (isToETH) {
// Create a WETH unwrapper if going to ETH.
// Create a WETH unwrapper if going to ETH.
// Dont add the wethTransformer on CELO. There is no wrap/unwrap logic for CELO.
if (isToETH && this.chainId !== ChainId.Celo) {
transforms.push({
deploymentNonce: this.transformerNonces.wethTransformer,
data: encodeWethTransformerData({
@@ -492,10 +493,11 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
amounts: [],
}),
});
const TO_ETH_ADDRESS = this.chainId === ChainId.Celo ? this.contractAddresses.etherToken : ETH_TOKEN_ADDRESS;
const calldataHexString = this._exchangeProxy
.transformERC20(
isFromETH ? ETH_TOKEN_ADDRESS : sellToken,
isToETH ? ETH_TOKEN_ADDRESS : buyToken,
isToETH ? TO_ETH_ADDRESS : buyToken,
shouldSellEntireBalance ? MAX_UINT256 : sellAmount,
minBuyAmount,
transforms,

View File

@@ -49,6 +49,7 @@ import {
SUSHISWAP_ROUTER_BY_CHAIN_ID,
SWERVE_MAINNET_INFOS,
TRADER_JOE_ROUTER_BY_CHAIN_ID,
UBESWAP_ROUTER_BY_CHAIN_ID,
UNISWAPV2_ROUTER_BY_CHAIN_ID,
WAULTSWAP_ROUTER_BY_CHAIN_ID,
XSIGMA_MAINNET_INFOS,
@@ -486,6 +487,7 @@ export function uniswapV2LikeRouterAddress(
| ERC20BridgeSource.JetSwap
| ERC20BridgeSource.TraderJoe
| ERC20BridgeSource.Pangolin
| ERC20BridgeSource.UbeSwap
| ERC20BridgeSource.SpookySwap
| ERC20BridgeSource.SpiritSwap,
): string {
@@ -528,6 +530,8 @@ export function uniswapV2LikeRouterAddress(
return PANGOLIN_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.TraderJoe:
return TRADER_JOE_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.UbeSwap:
return UBESWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.SpookySwap:
return SPOOKYSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.SpiritSwap:

View File

@@ -58,6 +58,7 @@ function valueByChainId<T>(rest: Partial<{ [key in ChainId]: T }>, defaultValue:
[ChainId.PolygonMumbai]: defaultValue,
[ChainId.Avalanche]: defaultValue,
[ChainId.Fantom]: defaultValue,
[ChainId.Celo]: defaultValue,
...(rest || {}),
};
}
@@ -176,6 +177,11 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.SpookySwap,
ERC20BridgeSource.SushiSwap,
]),
[ChainId.Celo]: new SourceFilters([
ERC20BridgeSource.UbeSwap,
ERC20BridgeSource.SushiSwap,
ERC20BridgeSource.MultiHop,
]),
},
new SourceFilters([]),
);
@@ -294,6 +300,11 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.SpookySwap,
ERC20BridgeSource.SushiSwap,
]),
[ChainId.Celo]: new SourceFilters([
ERC20BridgeSource.UbeSwap,
ERC20BridgeSource.SushiSwap,
ERC20BridgeSource.MultiHop,
]),
},
new SourceFilters([]),
);
@@ -314,6 +325,7 @@ export const FEE_QUOTE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSource[]>
[ChainId.Polygon]: [ERC20BridgeSource.QuickSwap, ERC20BridgeSource.SushiSwap],
[ChainId.Avalanche]: [ERC20BridgeSource.Pangolin, ERC20BridgeSource.TraderJoe, ERC20BridgeSource.SushiSwap],
[ChainId.Fantom]: [ERC20BridgeSource.SpiritSwap, ERC20BridgeSource.SpookySwap, ERC20BridgeSource.SushiSwap],
[ChainId.Celo]: [ERC20BridgeSource.UbeSwap, ERC20BridgeSource.SushiSwap],
},
[],
);
@@ -466,6 +478,12 @@ export const AVALANCHE_TOKENS = {
aUSDT: '0x532e6537fea298397212f09a61e03311686f548e',
};
export const CELO_TOKENS = {
WETH: '0xe919f65739c26a42616b7b8eedc6b5524d1e3ac4',
CELO: '0x471ece3750da237f93b8e339c536989b8978a438',
mCUSD: '0x64defa3544c695db8c535d289d843a189aa26b98',
};
export const FANTOM_TOKENS = {
WFTM: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83',
WETH: '0x74b23882a30290451a17c44f4f05243b6b58c76d',
@@ -655,6 +673,7 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
AVALANCHE_TOKENS.USDC,
],
[ChainId.Fantom]: [FANTOM_TOKENS.WFTM, FANTOM_TOKENS.WETH, FANTOM_TOKENS.DAI, FANTOM_TOKENS.USDC],
[ChainId.Celo]: [CELO_TOKENS.mCUSD, CELO_TOKENS.WETH, CELO_TOKENS.CELO],
},
[],
);
@@ -686,6 +705,9 @@ export const DEFAULT_TOKEN_ADJACENCY_GRAPH_BY_CHAIN_ID = valueByChainId<TokenAdj
[ChainId.Fantom]: new TokenAdjacencyGraphBuilder({
default: DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID[ChainId.Fantom],
}).build(),
[ChainId.Celo]: new TokenAdjacencyGraphBuilder({
default: DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID[ChainId.Celo],
}).build(),
},
new TokenAdjacencyGraphBuilder({ default: [] }).build(),
);
@@ -701,6 +723,7 @@ export const NATIVE_FEE_TOKEN_BY_CHAIN_ID = valueByChainId<string>(
[ChainId.Polygon]: getContractAddressesForChainOrThrow(ChainId.Polygon).etherToken,
[ChainId.Avalanche]: getContractAddressesForChainOrThrow(ChainId.Avalanche).etherToken,
[ChainId.Fantom]: getContractAddressesForChainOrThrow(ChainId.Fantom).etherToken,
[ChainId.Celo]: getContractAddressesForChainOrThrow(ChainId.Celo).etherToken,
},
NULL_ADDRESS,
);
@@ -1373,6 +1396,7 @@ export const SUSHISWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
[ChainId.Polygon]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
[ChainId.Avalanche]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
[ChainId.Fantom]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
[ChainId.Celo]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
},
NULL_ADDRESS,
);
@@ -1746,6 +1770,13 @@ export const TRADER_JOE_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
NULL_ADDRESS,
);
export const UBESWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Celo]: '0x7d28570135a2b1930f331c507f65039d4937f66c',
},
NULL_ADDRESS,
);
export const SPIRITSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Fantom]: '0x16327e3fbdaca3bcf7e38f5af2599d2ddc33ae52',
@@ -1911,6 +1942,11 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.Pangolin]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.TraderJoe]: uniswapV2CloneGasSchedule,
//
// Celo
//
[ERC20BridgeSource.UbeSwap]: uniswapV2CloneGasSchedule,
//
// Fantom
//

View File

@@ -184,6 +184,8 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'Pangolin');
case ERC20BridgeSource.TraderJoe:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'TraderJoe');
case ERC20BridgeSource.UbeSwap:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'UbeSwap');
case ERC20BridgeSource.SpiritSwap:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'SpiritSwap');
case ERC20BridgeSource.SpookySwap:
@@ -264,6 +266,7 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
case ERC20BridgeSource.JetSwap:
case ERC20BridgeSource.Pangolin:
case ERC20BridgeSource.TraderJoe:
case ERC20BridgeSource.UbeSwap:
case ERC20BridgeSource.SpiritSwap:
case ERC20BridgeSource.SpookySwap:
const uniswapV2FillData = (order as OptimizedMarketBridgeOrder<UniswapV2FillData>).fillData;
@@ -458,6 +461,8 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.TraderJoe]: routerAddressPathEncoder,
[ERC20BridgeSource.SpiritSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder,
// Celo
[ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder,
// BSC
[ERC20BridgeSource.PancakeSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.PancakeSwapV2]: routerAddressPathEncoder,

View File

@@ -1197,6 +1197,7 @@ export class SamplerOperations {
case ERC20BridgeSource.JetSwap:
case ERC20BridgeSource.Pangolin:
case ERC20BridgeSource.TraderJoe:
case ERC20BridgeSource.UbeSwap:
case ERC20BridgeSource.SpiritSwap:
case ERC20BridgeSource.SpookySwap:
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
@@ -1468,6 +1469,7 @@ export class SamplerOperations {
case ERC20BridgeSource.JetSwap:
case ERC20BridgeSource.Pangolin:
case ERC20BridgeSource.TraderJoe:
case ERC20BridgeSource.UbeSwap:
case ERC20BridgeSource.SpiritSwap:
case ERC20BridgeSource.SpookySwap:
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);

View File

@@ -92,6 +92,8 @@ export enum ERC20BridgeSource {
// Avalanche
Pangolin = 'Pangolin',
TraderJoe = 'TraderJoe',
// Celo only
UbeSwap = 'UbeSwap',
// Fantom
SpiritSwap = 'SpiritSwap',
SpookySwap = 'SpookySwap',

View File

@@ -1,4 +1,14 @@
[
{
"version": "6.9.0",
"changes": [
{
"note": "Add Celo addresses",
"pr": 368
}
],
"timestamp": 1637102971
},
{
"timestamp": 1635903615,
"version": "6.8.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.9.0 - _November 16, 2021_
* Add Celo addresses (#368)
## v6.8.1 - _November 3, 2021_
* Dependencies updated

View File

@@ -418,5 +418,47 @@
"fillQuoteTransformer": "0x71de60a1b160094a3f6c7e1b883ff9337d639131",
"positiveSlippageFeeTransformer": "0xe87d69b285005cc82b53b844322652c49ed64600"
}
},
"42220": {
"erc20Proxy": "0x0000000000000000000000000000000000000000",
"erc721Proxy": "0x0000000000000000000000000000000000000000",
"zrxToken": "0x0000000000000000000000000000000000000000",
"etherToken": "0x471ece3750da237f93b8e339c536989b8978a438",
"exchangeV2": "0x0000000000000000000000000000000000000000",
"exchange": "0x0000000000000000000000000000000000000000",
"assetProxyOwner": "0x0000000000000000000000000000000000000000",
"zeroExGovernor": "0x0000000000000000000000000000000000000000",
"forwarder": "0x0000000000000000000000000000000000000000",
"coordinatorRegistry": "0x0000000000000000000000000000000000000000",
"coordinator": "0x0000000000000000000000000000000000000000",
"multiAssetProxy": "0x0000000000000000000000000000000000000000",
"staticCallProxy": "0x0000000000000000000000000000000000000000",
"erc1155Proxy": "0x0000000000000000000000000000000000000000",
"devUtils": "0x0000000000000000000000000000000000000000",
"zrxVault": "0x0000000000000000000000000000000000000000",
"staking": "0x0000000000000000000000000000000000000000",
"stakingProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeSampler": "0x0000000000000000000000000000000000000000",
"chaiBridge": "0x0000000000000000000000000000000000000000",
"dydxBridge": "0x0000000000000000000000000000000000000000",
"godsUnchainedValidator": "0x0000000000000000000000000000000000000000",
"broker": "0x0000000000000000000000000000000000000000",
"chainlinkStopLimit": "0x0000000000000000000000000000000000000000",
"maximumGasPrice": "0x0000000000000000000000000000000000000000",
"dexForwarderBridge": "0x0000000000000000000000000000000000000000",
"exchangeProxyGovernor": "0x92115010fd9b170d4918b102efc86b1b7bebdc7f",
"exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"exchangeProxyTransformerDeployer": "0x1fe80d5ad9464dba2d60b88e449305f184823f8a",
"exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498",
"exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000",
"zrxTreasury": "0x0000000000000000000000000000000000000000",
"transformers": {
"wethTransformer": "0x948e03e708b4c62c63f89157a3aa76b986c110ed",
"payTakerTransformer": "0x90fb6c638ece8f3e4bfda1c6d6425626b53148b0",
"affiliateFeeTransformer": "0xc93913692ed073cb0cb37d4a760afd7916e9cb01",
"fillQuoteTransformer": "0xa825d4d3c4d2820c52da69fcccf269b4081871f2",
"positiveSlippageFeeTransformer": "0x9ffc7a79133ed5242777e40764777a6d5aab282c"
}
}
}

View File

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

View File

@@ -54,6 +54,7 @@ export enum ChainId {
PolygonMumbai = 80001,
Avalanche = 43114,
Fantom = 250,
Celo = 42220,
}
/**

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "13.18.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "13.18.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v13.18.3 - _November 16, 2021_
* Dependencies updated
## v13.18.2 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers",
"version": "13.18.2",
"version": "13.18.3",
"engines": {
"node": ">=6.12"
},
@@ -57,7 +57,7 @@
"dependencies": {
"@0x/assert": "^3.0.29",
"@0x/base-contract": "^6.4.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-addresses": "^6.9.0",
"@0x/json-schemas": "^6.3.0",
"@0x/types": "^3.3.4",
"@0x/utils": "^6.4.4",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1637102971,
"version": "8.1.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1637065617,
"version": "8.1.11",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "8.1.10",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v8.1.12 - _November 16, 2021_
* Dependencies updated
## v8.1.11 - _November 16, 2021_
* Dependencies updated
## v8.1.10 - _November 3, 2021_
* Add OtcOrders to fullMigrateAsync (#350)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.1.10",
"version": "8.1.12",
"engines": {
"node": ">=6.12"
},
@@ -68,20 +68,20 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.2",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-addresses": "^6.9.0",
"@0x/contracts-asset-proxy": "^3.7.19",
"@0x/contracts-coordinator": "^3.1.38",
"@0x/contracts-dev-utils": "^1.3.36",
"@0x/contracts-erc1155": "^2.1.37",
"@0x/contracts-erc20": "^3.3.22",
"@0x/contracts-erc20": "^3.3.23",
"@0x/contracts-erc721": "^3.1.37",
"@0x/contracts-exchange": "^3.2.38",
"@0x/contracts-exchange-forwarder": "^4.2.38",
"@0x/contracts-extensions": "^6.2.32",
"@0x/contracts-multisig": "^4.1.38",
"@0x/contracts-staking": "^2.0.45",
"@0x/contracts-utils": "^4.8.3",
"@0x/contracts-zero-ex": "^0.29.3",
"@0x/contracts-utils": "^4.8.4",
"@0x/contracts-zero-ex": "^0.29.5",
"@0x/sol-compiler": "^4.7.5",
"@0x/subproviders": "^6.6.0",
"@0x/typescript-typings": "^5.2.1",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1637102971,
"version": "1.9.5",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1635903615,
"version": "1.9.4",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.9.5 - _November 16, 2021_
* Dependencies updated
## v1.9.4 - _November 3, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/protocol-utils",
"version": "1.9.4",
"version": "1.9.5",
"engines": {
"node": ">=6.12"
},
@@ -63,8 +63,8 @@
},
"dependencies": {
"@0x/assert": "^3.0.29",
"@0x/contract-addresses": "^6.8.1",
"@0x/contract-wrappers": "^13.18.2",
"@0x/contract-addresses": "^6.9.0",
"@0x/contract-wrappers": "^13.18.3",
"@0x/json-schemas": "^6.3.0",
"@0x/subproviders": "^6.6.0",
"@0x/utils": "^6.4.4",