Compare commits
9 Commits
main
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
|
b319a4dceb | ||
|
e66307ba31 | ||
|
652d422622 | ||
|
5207565af8 | ||
|
d982d75e2e | ||
|
c5650da703 | ||
|
b19e29e03d | ||
|
e5cbfd87bc | ||
|
5a49be1322 |
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
@ -83,28 +83,30 @@ jobs:
|
||||
-p @0x/order-utils \
|
||||
-m --serial -c test:ci
|
||||
|
||||
# NOTE: disabled as ZRXToken.sol did not compile with the latest forge.
|
||||
# TODO: re-enable once the issue is resolved.
|
||||
- name: Run Forge build for erc20
|
||||
working-directory: contracts/erc20
|
||||
run: |
|
||||
forge --version
|
||||
forge build --sizes
|
||||
forge build --sizes --skip ZRXToken
|
||||
|
||||
- name: Run Forge tests for erc20
|
||||
working-directory: contracts/erc20
|
||||
run: |
|
||||
forge test -vvv --gas-report
|
||||
# - name: Run Forge tests for erc20
|
||||
# working-directory: contracts/erc20
|
||||
# run: |
|
||||
# forge test -vvv --gas-report
|
||||
|
||||
- name: Run Forge coverage for erc20
|
||||
working-directory: contracts/erc20
|
||||
run: |
|
||||
forge coverage --report summary --report lcov
|
||||
# - name: Run Forge coverage for erc20
|
||||
# working-directory: contracts/erc20
|
||||
# run: |
|
||||
# forge coverage --report summary --report lcov
|
||||
|
||||
- name: Upload the coverage report to Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
base-path: ./contracts/erc20/
|
||||
path-to-lcov: ./contracts/erc20/lcov.info
|
||||
# - name: Upload the coverage report to Coveralls
|
||||
# uses: coverallsapp/github-action@master
|
||||
# with:
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# base-path: ./contracts/erc20/
|
||||
# path-to-lcov: ./contracts/erc20/lcov.info
|
||||
|
||||
- name: Run Forge build for zero-ex
|
||||
working-directory: contracts/zero-ex
|
||||
@ -142,19 +144,20 @@ jobs:
|
||||
forge --version
|
||||
forge build --sizes
|
||||
|
||||
- name: Run Forge tests on governance contracts
|
||||
working-directory: ./contracts/governance
|
||||
run: |
|
||||
forge test -vvv --gas-report
|
||||
# TODO: re-enable once the issue is resolved.
|
||||
# - name: Run Forge tests on governance contracts
|
||||
# working-directory: ./contracts/governance
|
||||
# run: |
|
||||
# forge test -vvv --gas-report
|
||||
|
||||
- name: Run Forge coverage on governance contracts
|
||||
working-directory: ./contracts/governance
|
||||
run: |
|
||||
forge coverage --report lcov
|
||||
# - name: Run Forge coverage on governance contracts
|
||||
# working-directory: ./contracts/governance
|
||||
# run: |
|
||||
# forge coverage --report lcov
|
||||
|
||||
- name: Upload the coverage report to Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
base-path: ./contracts/governance/
|
||||
path-to-lcov: ./contracts/governance/lcov.info
|
||||
# - name: Upload the coverage report to Coveralls
|
||||
# uses: coverallsapp/github-action@master
|
||||
# with:
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# base-path: ./contracts/governance/
|
||||
# path-to-lcov: ./contracts/governance/lcov.info
|
||||
|
30
.github/workflows/publish.yml
vendored
30
.github/workflows/publish.yml
vendored
@ -14,6 +14,8 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PublishBranch: publish/${{github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}
|
||||
steps:
|
||||
- name: 'check successful status'
|
||||
run: |
|
||||
@ -38,6 +40,10 @@ jobs:
|
||||
run: |
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git config --global user.name "Github Actions"
|
||||
- name: 'Checkout new branch'
|
||||
run: |
|
||||
git checkout -b $PublishBranch
|
||||
git push -u origin $PublishBranch
|
||||
- name: 'install dependencies'
|
||||
run: |
|
||||
yarn -D
|
||||
@ -49,9 +55,23 @@ jobs:
|
||||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
||||
- name: 'merge into main branch'
|
||||
if: github.event.inputs.prerelease == '' # unless it's a prerelease
|
||||
- name: 'Create PR to merge into ref branch'
|
||||
run: |
|
||||
git checkout main && \
|
||||
git merge ${{ github.ref }} && \
|
||||
git push
|
||||
gh pr create \
|
||||
-B ${{ github.ref_name }} \
|
||||
-H $PublishBranch \
|
||||
--title "Publish: CHANGELOG and Package Version Updates into ${{ github.ref_name }}" \
|
||||
--body "Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into ${{ github.ref_name}} branch" \
|
||||
--reviewer ${{ github.actor }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
- name: 'Create PR to merge ref branch into main'
|
||||
run: |
|
||||
gh pr create \
|
||||
-B main \
|
||||
-H ${{ github.ref_name }} \
|
||||
--title "Publish: Sync ${{ github.ref_name }} into main " \
|
||||
--body "Syncing ${{ github.ref_name }} back into main after publish action. NOTE: this PR should be merged after CHANGELOG and package version updates have been merged into ${{ github.ref_name }}" \
|
||||
--reviewer ${{ github.actor }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "4.0.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "4.0.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1692368658,
|
||||
"version": "4.0.12",
|
||||
|
@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.0.14 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.0.13 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.0.12 - _August 18, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "4.0.12",
|
||||
"version": "4.0.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -24,7 +24,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/protocol",
|
||||
"devDependencies": {
|
||||
"@0x/contracts-utils": "^4.8.50",
|
||||
"@0x/contracts-utils": "^4.8.52",
|
||||
"@0x/ts-doc-gen": "^0.0.28",
|
||||
"typedoc": "~0.16.11"
|
||||
},
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "5.4.60",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "5.4.59",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1692368658,
|
||||
"version": "5.4.58",
|
||||
|
@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v5.4.60 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v5.4.59 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v5.4.58 - _August 18, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-test-utils",
|
||||
"version": "5.4.58",
|
||||
"version": "5.4.60",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,7 +41,7 @@
|
||||
"dependencies": {
|
||||
"@0x/assert": "^3.0.36",
|
||||
"@0x/base-contract": "^7.0.0",
|
||||
"@0x/contract-addresses": "^8.11.0",
|
||||
"@0x/contract-addresses": "^8.13.0",
|
||||
"@0x/dev-utils": "^5.0.2",
|
||||
"@0x/json-schemas": "^6.4.4",
|
||||
"@0x/order-utils": "^10.4.28",
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "1.4.54",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "1.4.53",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1692368658,
|
||||
"version": "1.4.52",
|
||||
|
@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.4.54 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.4.53 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.4.52 - _August 18, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-treasury",
|
||||
"version": "1.4.52",
|
||||
"version": "1.4.54",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -46,12 +46,12 @@
|
||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^5.8.5",
|
||||
"@0x/contract-addresses": "^8.11.0",
|
||||
"@0x/contract-addresses": "^8.13.0",
|
||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||
"@0x/contracts-erc20": "3.3.57",
|
||||
"@0x/contracts-gen": "^2.0.50",
|
||||
"@0x/contracts-staking": "^2.0.45",
|
||||
"@0x/contracts-test-utils": "^5.4.58",
|
||||
"@0x/contracts-test-utils": "^5.4.60",
|
||||
"@0x/sol-compiler": "^4.8.2",
|
||||
"@0x/ts-doc-gen": "^0.0.28",
|
||||
"@types/isomorphic-fetch": "^0.0.35",
|
||||
@ -73,7 +73,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^7.0.0",
|
||||
"@0x/protocol-utils": "^11.24.0",
|
||||
"@0x/protocol-utils": "^11.24.2",
|
||||
"@0x/subproviders": "^8.0.1",
|
||||
"@0x/types": "^3.3.7",
|
||||
"@0x/typescript-typings": "^5.3.1",
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "4.8.52",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "4.8.51",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1692368658,
|
||||
"version": "4.8.50",
|
||||
|
@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.8.52 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.8.51 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.8.50 - _August 18, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-utils",
|
||||
"version": "4.8.50",
|
||||
"version": "4.8.52",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -45,7 +45,7 @@
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^5.8.5",
|
||||
"@0x/contracts-gen": "^2.0.50",
|
||||
"@0x/contracts-test-utils": "^5.4.58",
|
||||
"@0x/contracts-test-utils": "^5.4.60",
|
||||
"@0x/dev-utils": "^5.0.2",
|
||||
"@0x/order-utils": "^10.4.28",
|
||||
"@0x/sol-compiler": "^4.8.2",
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"version": "0.49.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Allowlist Sepolia in AbstractBridgeAdapter"
|
||||
}
|
||||
],
|
||||
"timestamp": 1700094997
|
||||
},
|
||||
{
|
||||
"version": "0.48.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add VelodromeV2 support on Base"
|
||||
}
|
||||
],
|
||||
"timestamp": 1693346928
|
||||
},
|
||||
{
|
||||
"version": "0.47.0",
|
||||
"changes": [
|
||||
|
@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.49.0 - _November 16, 2023_
|
||||
|
||||
* Allowlist Sepolia in AbstractBridgeAdapter
|
||||
|
||||
## v0.48.0 - _August 29, 2023_
|
||||
|
||||
* Add VelodromeV2 support on Base
|
||||
|
||||
## v0.47.0 - _August 18, 2023_
|
||||
|
||||
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||
|
@ -23,12 +23,14 @@ abstract contract AbstractBridgeAdapter is IBridgeAdapter {
|
||||
assembly {
|
||||
chainId := chainid()
|
||||
}
|
||||
// Skip chain id validation on Ganache (1337), Anvil (31337), Goerli (5), Mumbai (80001), Base Goerli (84531)
|
||||
// Skip chain id validation on Ganache (1337), Anvil (31337), Goerli (5), Mumbai (80001), Base Goerli (84531),
|
||||
// Sepolia (11155111)
|
||||
bool skipValidation = (chainId == 1337 ||
|
||||
chainId == 31337 ||
|
||||
chainId == 5 ||
|
||||
chainId == 80001 ||
|
||||
chainId == 84531);
|
||||
chainId == 84531 ||
|
||||
chainId == 11155111);
|
||||
|
||||
if (chainId != expectedChainId && !skipValidation) {
|
||||
revert(string(abi.encodePacked(expectedChainName, "BridgeAdapter.constructor: wrong chain ID")));
|
||||
|
@ -24,6 +24,7 @@ import "./mixins/MixinCurve.sol";
|
||||
import "./mixins/MixinCurveV2.sol";
|
||||
import "./mixins/MixinMaverickV1.sol";
|
||||
import "./mixins/MixinSolidly.sol";
|
||||
import "./mixins/MixinVelodromeV2.sol";
|
||||
|
||||
contract BaseBridgeAdapter is
|
||||
AbstractBridgeAdapter(8453, "Base"),
|
||||
@ -33,7 +34,8 @@ contract BaseBridgeAdapter is
|
||||
MixinCurve,
|
||||
MixinCurveV2,
|
||||
MixinMaverickV1,
|
||||
MixinSolidly
|
||||
MixinSolidly,
|
||||
MixinVelodromeV2
|
||||
{
|
||||
constructor(IEtherToken weth) public MixinCurve(weth) {}
|
||||
|
||||
@ -80,6 +82,11 @@ contract BaseBridgeAdapter is
|
||||
return (0, true);
|
||||
}
|
||||
boughtAmount = _tradeMaverickV1(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||
} else if (protocolId == BridgeProtocols.VELODROMEV2) {
|
||||
if (dryRun) {
|
||||
return (0, true);
|
||||
}
|
||||
boughtAmount = _tradeVelodromeV2(sellToken, sellAmount, order.bridgeData);
|
||||
}
|
||||
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-zero-ex",
|
||||
"version": "0.47.0",
|
||||
"version": "0.49.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -51,10 +51,10 @@
|
||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^5.8.5",
|
||||
"@0x/contract-addresses": "^8.11.0",
|
||||
"@0x/contract-addresses": "^8.13.0",
|
||||
"@0x/contracts-erc20": "^3.3.57",
|
||||
"@0x/contracts-gen": "^2.0.50",
|
||||
"@0x/contracts-test-utils": "^5.4.58",
|
||||
"@0x/contracts-test-utils": "^5.4.60",
|
||||
"@0x/dev-utils": "^5.0.2",
|
||||
"@0x/order-utils": "^10.4.28",
|
||||
"@0x/sol-compiler": "^4.8.2",
|
||||
@ -80,7 +80,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^7.0.0",
|
||||
"@0x/protocol-utils": "^11.24.0",
|
||||
"@0x/protocol-utils": "^11.24.2",
|
||||
"@0x/subproviders": "^8.0.1",
|
||||
"@0x/types": "^3.3.7",
|
||||
"@0x/typescript-typings": "^5.3.1",
|
||||
|
@ -36,4 +36,12 @@ contract BaseBridgeAdapterTest is Test {
|
||||
function testSupportMaverickV1() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
||||
}
|
||||
|
||||
function testSupportSolidly() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.SOLIDLY) << 128)));
|
||||
}
|
||||
|
||||
function testSupportVelodromeV2() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.VELODROMEV2) << 128)));
|
||||
}
|
||||
}
|
||||
|
@ -66,3 +66,8 @@ Note: Some addresses have changed across various networks
|
||||
Avalanche, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://snowtrace.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
Fantom, `0xdef189deaef76e379df891899eb5a00a94cbc250 <https://ftmscan.com/address/0xdef189deaef76e379df891899eb5a00a94cbc250>`__
|
||||
Celo, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://explorer.celo.org/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
Arbitrum, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://arbiscan.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
Base, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://basescan.org/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
zkEVM, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://zkevm.polygonscan.com/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
Sepolia, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://sepolia.etherscan.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||
Mumbai, `0xf471d32cb40837bf24529fcf17418fc1a4807626 <https://mumbai.polygonscan.com/address/0xf471d32cb40837bf24529fcf17418fc1a4807626>`__
|
||||
|
5
funding.json
Normal file
5
funding.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"opRetro": {
|
||||
"projectId": "0x0fad18f37ecec4f4f4ca18e60c353eb11462363e8aa14562b5d96af54108d106"
|
||||
}
|
||||
}
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"version": "8.13.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add Sepolia addresses"
|
||||
}
|
||||
],
|
||||
"timestamp": 1700094997
|
||||
},
|
||||
{
|
||||
"version": "8.12.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add VelodromeV2 support on Base"
|
||||
}
|
||||
],
|
||||
"timestamp": 1693346928
|
||||
},
|
||||
{
|
||||
"version": "8.11.0",
|
||||
"changes": [
|
||||
|
@ -6,6 +6,12 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v8.13.0 - _November 16, 2023_
|
||||
|
||||
* Add Sepolia addresses
|
||||
## v8.12.0 - _August 29, 2023_
|
||||
|
||||
* Add VelodromeV2 support on Base
|
||||
## v8.11.0 - _August 18, 2023_
|
||||
|
||||
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||
|
@ -271,8 +271,31 @@
|
||||
"wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
||||
"payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
||||
"affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066",
|
||||
"fillQuoteTransformer": "0xab93d03a3e7e51ec5edaef75d27f20917da4c18e",
|
||||
"fillQuoteTransformer": "0x2c46d57bb5af87a13a51dd5b62ba7d3bc7e12e9c",
|
||||
"positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e"
|
||||
}
|
||||
},
|
||||
"11155111": {
|
||||
"zrxToken": "0x0000000000000000000000000000000000000000",
|
||||
"etherToken": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
|
||||
"zeroExGovernor": "0x5c1f7772ce24d942b85e9b6576f7b5ef70686f5a",
|
||||
"zrxVault": "0x0000000000000000000000000000000000000000",
|
||||
"staking": "0x0000000000000000000000000000000000000000",
|
||||
"stakingProxy": "0x0000000000000000000000000000000000000000",
|
||||
"erc20BridgeProxy": "0x0000000000000000000000000000000000000000",
|
||||
"erc20BridgeSampler": "0x0000000000000000000000000000000000000000",
|
||||
"exchangeProxyGovernor": "0x5c1f7772ce24d942b85e9b6576f7b5ef70686f5a",
|
||||
"exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
|
||||
"exchangeProxyTransformerDeployer": "0x58bca53ebba1aaf25f0edcd8dad6421872fe20b2",
|
||||
"exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498",
|
||||
"exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000",
|
||||
"zrxTreasury": "0x0000000000000000000000000000000000000000",
|
||||
"transformers": {
|
||||
"wethTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e",
|
||||
"payTakerTransformer": "0x44e0f3975e95387f3866dd7cab1f51050394a3d1",
|
||||
"affiliateFeeTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
||||
"fillQuoteTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
||||
"positiveSlippageFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contract-addresses",
|
||||
"version": "8.11.0",
|
||||
"version": "8.13.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@ -1,20 +1,16 @@
|
||||
import addresses from '../addresses.json';
|
||||
|
||||
export interface ContractAddresses {
|
||||
zrxToken: string;
|
||||
etherToken: string;
|
||||
zeroExGovernor: string;
|
||||
zrxVault: string;
|
||||
staking: string;
|
||||
stakingProxy: string;
|
||||
erc20BridgeProxy: string;
|
||||
erc20BridgeSampler: string;
|
||||
exchangeProxyGovernor: string;
|
||||
etherToken: string;
|
||||
exchangeProxy: string;
|
||||
exchangeProxyTransformerDeployer: string;
|
||||
exchangeProxyFlashWallet: string;
|
||||
exchangeProxyGovernor: string;
|
||||
exchangeProxyLiquidityProviderSandbox: string;
|
||||
zrxTreasury: string;
|
||||
exchangeProxyTransformerDeployer: string;
|
||||
staking: string;
|
||||
stakingProxy: string;
|
||||
transformers: {
|
||||
wethTransformer: string;
|
||||
payTakerTransformer: string;
|
||||
@ -22,21 +18,33 @@ export interface ContractAddresses {
|
||||
affiliateFeeTransformer: string;
|
||||
positiveSlippageFeeTransformer: string;
|
||||
};
|
||||
zeroExGovernor: string;
|
||||
zrxToken: string;
|
||||
zrxTreasury: string;
|
||||
zrxVault: string;
|
||||
}
|
||||
|
||||
export enum ChainId {
|
||||
Mainnet = 1,
|
||||
Goerli = 5,
|
||||
Ganache = 1337,
|
||||
Optimism = 10,
|
||||
BSC = 56,
|
||||
Polygon = 137,
|
||||
PolygonMumbai = 80001,
|
||||
Avalanche = 43114,
|
||||
Fantom = 250,
|
||||
Celo = 42220,
|
||||
Optimism = 10,
|
||||
Arbitrum = 42161,
|
||||
Ganache = 1337,
|
||||
Base = 8453,
|
||||
Arbitrum = 42161,
|
||||
Avalanche = 43114,
|
||||
Celo = 42220,
|
||||
PolygonMumbai = 80001,
|
||||
Sepolia = 11155111
|
||||
}
|
||||
|
||||
/**
|
||||
* Narrow a JavaScript number to a Chain ID.
|
||||
*/
|
||||
export function isChainId(chainId: number): chainId is ChainId {
|
||||
return Object.values(ChainId).includes(chainId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@ import * as chai from 'chai';
|
||||
import { bufferToHex, rlphash } from 'ethereumjs-util';
|
||||
import 'mocha';
|
||||
|
||||
import { ChainId, getContractAddressesForChainOrThrow } from '../src';
|
||||
import { ChainId, getContractAddressesForChainOrThrow, isChainId } from '../src';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
@ -68,3 +68,12 @@ describe('addresses.json sanity test', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("isChainId", () => {
|
||||
it("should return true for existing chain ids", () => {
|
||||
expect(isChainId(1)).to.be.true;
|
||||
});
|
||||
it("should return false for non-existing chain ids", () => {
|
||||
expect(isChainId(666)).to.be.false;
|
||||
});
|
||||
});
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "13.23.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "13.23.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1692368658,
|
||||
"version": "13.23.6",
|
||||
|
@ -6,6 +6,12 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v13.23.8 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
## v13.23.7 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
## v13.23.6 - _August 18, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contract-wrappers",
|
||||
"version": "13.23.6",
|
||||
"version": "13.23.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -59,7 +59,7 @@
|
||||
"dependencies": {
|
||||
"@0x/assert": "^3.0.36",
|
||||
"@0x/base-contract": "^7.0.0",
|
||||
"@0x/contract-addresses": "^8.11.0",
|
||||
"@0x/contract-addresses": "^8.13.0",
|
||||
"@0x/json-schemas": "^6.4.4",
|
||||
"@0x/types": "^3.3.7",
|
||||
"@0x/utils": "^7.0.0",
|
||||
|
@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1700094997,
|
||||
"version": "11.24.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1693346928,
|
||||
"version": "11.24.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "11.24.0",
|
||||
"changes": [
|
||||
|
@ -6,6 +6,12 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v11.24.2 - _November 16, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
## v11.24.1 - _August 29, 2023_
|
||||
|
||||
* Dependencies updated
|
||||
## v11.24.0 - _August 18, 2023_
|
||||
|
||||
* Add MaverickV1 support on Ethereum, BSC, and Base
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/protocol-utils",
|
||||
"version": "11.24.0",
|
||||
"version": "11.24.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -62,8 +62,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/assert": "^3.0.36",
|
||||
"@0x/contract-addresses": "^8.11.0",
|
||||
"@0x/contract-wrappers": "^13.23.6",
|
||||
"@0x/contract-addresses": "^8.13.0",
|
||||
"@0x/contract-wrappers": "^13.23.8",
|
||||
"@0x/json-schemas": "^6.4.4",
|
||||
"@0x/subproviders": "^8.0.1",
|
||||
"@0x/utils": "^7.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user