Compare commits
1 Commits
developmen
...
ewong_prot
Author | SHA1 | Date | |
---|---|---|---|
|
9e0a36477d |
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
@@ -83,30 +83,28 @@ jobs:
|
|||||||
-p @0x/order-utils \
|
-p @0x/order-utils \
|
||||||
-m --serial -c test:ci
|
-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
|
- name: Run Forge build for erc20
|
||||||
working-directory: contracts/erc20
|
working-directory: contracts/erc20
|
||||||
run: |
|
run: |
|
||||||
forge --version
|
forge --version
|
||||||
forge build --sizes --skip ZRXToken
|
forge build --sizes
|
||||||
|
|
||||||
# - name: Run Forge tests for erc20
|
- name: Run Forge tests for erc20
|
||||||
# working-directory: contracts/erc20
|
working-directory: contracts/erc20
|
||||||
# run: |
|
run: |
|
||||||
# forge test -vvv --gas-report
|
forge test -vvv --gas-report
|
||||||
|
|
||||||
# - name: Run Forge coverage for erc20
|
- name: Run Forge coverage for erc20
|
||||||
# working-directory: contracts/erc20
|
working-directory: contracts/erc20
|
||||||
# run: |
|
run: |
|
||||||
# forge coverage --report summary --report lcov
|
forge coverage --report summary --report lcov
|
||||||
|
|
||||||
# - name: Upload the coverage report to Coveralls
|
- name: Upload the coverage report to Coveralls
|
||||||
# uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
# with:
|
with:
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# base-path: ./contracts/erc20/
|
base-path: ./contracts/erc20/
|
||||||
# path-to-lcov: ./contracts/erc20/lcov.info
|
path-to-lcov: ./contracts/erc20/lcov.info
|
||||||
|
|
||||||
- name: Run Forge build for zero-ex
|
- name: Run Forge build for zero-ex
|
||||||
working-directory: contracts/zero-ex
|
working-directory: contracts/zero-ex
|
||||||
@@ -144,20 +142,19 @@ jobs:
|
|||||||
forge --version
|
forge --version
|
||||||
forge build --sizes
|
forge build --sizes
|
||||||
|
|
||||||
# TODO: re-enable once the issue is resolved.
|
- name: Run Forge tests on governance contracts
|
||||||
# - name: Run Forge tests on governance contracts
|
working-directory: ./contracts/governance
|
||||||
# working-directory: ./contracts/governance
|
run: |
|
||||||
# run: |
|
forge test -vvv --gas-report
|
||||||
# forge test -vvv --gas-report
|
|
||||||
|
|
||||||
# - name: Run Forge coverage on governance contracts
|
- name: Run Forge coverage on governance contracts
|
||||||
# working-directory: ./contracts/governance
|
working-directory: ./contracts/governance
|
||||||
# run: |
|
run: |
|
||||||
# forge coverage --report lcov
|
forge coverage --report lcov
|
||||||
|
|
||||||
# - name: Upload the coverage report to Coveralls
|
- name: Upload the coverage report to Coveralls
|
||||||
# uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
# with:
|
with:
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# base-path: ./contracts/governance/
|
base-path: ./contracts/governance/
|
||||||
# path-to-lcov: ./contracts/governance/lcov.info
|
path-to-lcov: ./contracts/governance/lcov.info
|
||||||
|
54
.github/workflows/publish.yml
vendored
54
.github/workflows/publish.yml
vendored
@@ -1,21 +1,19 @@
|
|||||||
name: publish
|
name: publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
ci_status:
|
ci_status:
|
||||||
description: 'required CI status'
|
description: 'required CI status'
|
||||||
default: 'success'
|
default: 'success'
|
||||||
required: true
|
required: true
|
||||||
prerelease:
|
prerelease:
|
||||||
description: 'prerelease name'
|
description: 'prerelease name'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
PublishBranch: publish/${{github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'check successful status'
|
- name: 'check successful status'
|
||||||
run: |
|
run: |
|
||||||
@@ -30,20 +28,16 @@ jobs:
|
|||||||
version: nightly
|
version: nightly
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
- name: 'configure git'
|
- name: 'configure git'
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "github-actions@github.com"
|
git config --global user.email "github-actions@github.com"
|
||||||
git config --global user.name "Github Actions"
|
git config --global user.name "Github Actions"
|
||||||
- name: 'Checkout new branch'
|
|
||||||
run: |
|
|
||||||
git checkout -b $PublishBranch
|
|
||||||
git push -u origin $PublishBranch
|
|
||||||
- name: 'install dependencies'
|
- name: 'install dependencies'
|
||||||
run: |
|
run: |
|
||||||
yarn -D
|
yarn -D
|
||||||
@@ -55,23 +49,9 @@ jobs:
|
|||||||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
||||||
- name: 'Create PR to merge into ref branch'
|
- name: 'merge into main branch'
|
||||||
|
if: github.event.inputs.prerelease == '' # unless it's a prerelease
|
||||||
run: |
|
run: |
|
||||||
gh pr create \
|
git checkout main && \
|
||||||
-B ${{ github.ref_name }} \
|
git merge ${{ github.ref }} && \
|
||||||
-H $PublishBranch \
|
git push
|
||||||
--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 }}
|
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -84,9 +84,6 @@ TODO.md
|
|||||||
# IDE file
|
# IDE file
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
*~
|
|
||||||
.\#*
|
|
||||||
\#*\#
|
|
||||||
|
|
||||||
# generated contract artifacts/
|
# generated contract artifacts/
|
||||||
generated-artifacts/
|
generated-artifacts/
|
||||||
|
@@ -1,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1691617396,
|
|
||||||
"version": "4.0.11",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "4.0.10",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "4.0.9",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
|
@@ -5,30 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
|
|
||||||
## v4.0.11 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.0.10 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.0.9 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.0.8 - _May 10, 2023_
|
## v4.0.8 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-erc20",
|
"name": "@0x/contracts-erc20",
|
||||||
"version": "4.0.14",
|
"version": "4.0.8",
|
||||||
"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.52",
|
"@0x/contracts-utils": "^4.8.46",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"typedoc": "~0.16.11"
|
"typedoc": "~0.16.11"
|
||||||
},
|
},
|
||||||
|
@@ -1,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1691617396,
|
|
||||||
"version": "5.4.57",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "5.4.56",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "5.4.55",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "5.4.54",
|
"version": "5.4.54",
|
||||||
|
@@ -5,30 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
|
|
||||||
## v5.4.57 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v5.4.56 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v5.4.55 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v5.4.54 - _May 10, 2023_
|
## v5.4.54 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-test-utils",
|
"name": "@0x/contracts-test-utils",
|
||||||
"version": "5.4.60",
|
"version": "5.4.54",
|
||||||
"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.13.0",
|
"@0x/contract-addresses": "^8.7.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,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1691617396,
|
|
||||||
"version": "1.4.51",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "1.4.50",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "1.4.49",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "1.4.48",
|
"version": "1.4.48",
|
||||||
|
@@ -5,30 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
|
|
||||||
## v1.4.51 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v1.4.50 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v1.4.49 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v1.4.48 - _May 10, 2023_
|
## v1.4.48 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-treasury",
|
"name": "@0x/contracts-treasury",
|
||||||
"version": "1.4.54",
|
"version": "1.4.48",
|
||||||
"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.13.0",
|
"@0x/contract-addresses": "^8.7.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.60",
|
"@0x/contracts-test-utils": "^5.4.54",
|
||||||
"@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.24.2",
|
"@0x/protocol-utils": "^11.22.2",
|
||||||
"@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,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1691617396,
|
|
||||||
"version": "4.8.49",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "4.8.48",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "4.8.47",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "4.8.46",
|
"version": "4.8.46",
|
||||||
|
@@ -5,30 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
|
|
||||||
## v4.8.49 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.8.48 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.8.47 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v4.8.46 - _May 10, 2023_
|
## v4.8.46 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-utils",
|
"name": "@0x/contracts-utils",
|
||||||
"version": "4.8.52",
|
"version": "4.8.46",
|
||||||
"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.60",
|
"@0x/contracts-test-utils": "^5.4.54",
|
||||||
"@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,49 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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": [
|
|
||||||
{
|
|
||||||
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1692368658
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "0.46.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add VelodromeV2 support on Optimism"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1691617396
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "0.45.1",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "0.45.0",
|
"version": "0.45.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
@@ -52,15 +7,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"note": "Remove Shell and MStable support"
|
"note": "Remove Shell and MStable support"
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Add Base Mainnet and Goerli BridgeAdapters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Add Uniswap V3 support on Avalanche and BSC"
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"timestamp": 1689791426
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "0.44.0",
|
"version": "0.44.0",
|
||||||
|
@@ -5,33 +5,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
|
|
||||||
## v0.46.0 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
|
||||||
|
|
||||||
## v0.45.1 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
|
|
||||||
## v0.45.0 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Remove Bancor V1 support
|
|
||||||
* Remove Shell and MStable support
|
|
||||||
* Add Base Mainnet and Goerli BridgeAdapters
|
|
||||||
* Add Uniswap V3 support on Avalanche and BSC
|
|
||||||
|
|
||||||
## v0.44.0 - _May 10, 2023_
|
## v0.44.0 - _May 10, 2023_
|
||||||
|
|
||||||
* Add Trader Joe V2 MixIn to Arbitrum
|
* Add Trader Joe V2 MixIn to Arbitrum
|
||||||
|
@@ -115,8 +115,6 @@
|
|||||||
"./contracts/src/transformers/bridges/ArbitrumBridgeAdapter.sol",
|
"./contracts/src/transformers/bridges/ArbitrumBridgeAdapter.sol",
|
||||||
"./contracts/src/transformers/bridges/AvalancheBridgeAdapter.sol",
|
"./contracts/src/transformers/bridges/AvalancheBridgeAdapter.sol",
|
||||||
"./contracts/src/transformers/bridges/BSCBridgeAdapter.sol",
|
"./contracts/src/transformers/bridges/BSCBridgeAdapter.sol",
|
||||||
"./contracts/src/transformers/bridges/BaseBridgeAdapter.sol",
|
|
||||||
"./contracts/src/transformers/bridges/BaseGoerliBridgeAdapter.sol",
|
|
||||||
"./contracts/src/transformers/bridges/BridgeProtocols.sol",
|
"./contracts/src/transformers/bridges/BridgeProtocols.sol",
|
||||||
"./contracts/src/transformers/bridges/CeloBridgeAdapter.sol",
|
"./contracts/src/transformers/bridges/CeloBridgeAdapter.sol",
|
||||||
"./contracts/src/transformers/bridges/EthereumBridgeAdapter.sol",
|
"./contracts/src/transformers/bridges/EthereumBridgeAdapter.sol",
|
||||||
|
@@ -23,14 +23,12 @@ abstract contract AbstractBridgeAdapter is IBridgeAdapter {
|
|||||||
assembly {
|
assembly {
|
||||||
chainId := chainid()
|
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 ||
|
bool skipValidation = (chainId == 1337 ||
|
||||||
chainId == 31337 ||
|
chainId == 31337 ||
|
||||||
chainId == 5 ||
|
chainId == 5 ||
|
||||||
chainId == 80001 ||
|
chainId == 80001 ||
|
||||||
chainId == 84531 ||
|
chainId == 84531);
|
||||||
chainId == 11155111);
|
|
||||||
|
|
||||||
if (chainId != expectedChainId && !skipValidation) {
|
if (chainId != expectedChainId && !skipValidation) {
|
||||||
revert(string(abi.encodePacked(expectedChainName, "BridgeAdapter.constructor: wrong chain ID")));
|
revert(string(abi.encodePacked(expectedChainName, "BridgeAdapter.constructor: wrong chain ID")));
|
||||||
|
@@ -28,7 +28,6 @@ import "./mixins/MixinNerve.sol";
|
|||||||
import "./mixins/MixinPlatypus.sol";
|
import "./mixins/MixinPlatypus.sol";
|
||||||
import "./mixins/MixinTraderJoeV2.sol";
|
import "./mixins/MixinTraderJoeV2.sol";
|
||||||
import "./mixins/MixinUniswapV2.sol";
|
import "./mixins/MixinUniswapV2.sol";
|
||||||
import "./mixins/MixinUniswapV3.sol";
|
|
||||||
import "./mixins/MixinWOOFi.sol";
|
import "./mixins/MixinWOOFi.sol";
|
||||||
import "./mixins/MixinZeroExBridge.sol";
|
import "./mixins/MixinZeroExBridge.sol";
|
||||||
|
|
||||||
@@ -45,7 +44,6 @@ contract AvalancheBridgeAdapter is
|
|||||||
MixinPlatypus,
|
MixinPlatypus,
|
||||||
MixinTraderJoeV2,
|
MixinTraderJoeV2,
|
||||||
MixinUniswapV2,
|
MixinUniswapV2,
|
||||||
MixinUniswapV3,
|
|
||||||
MixinWOOFi,
|
MixinWOOFi,
|
||||||
MixinZeroExBridge
|
MixinZeroExBridge
|
||||||
{
|
{
|
||||||
@@ -74,11 +72,6 @@ contract AvalancheBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
||||||
} else if (protocolId == BridgeProtocols.UNISWAPV3) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV3(sellToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.NERVE) {
|
} else if (protocolId == BridgeProtocols.NERVE) {
|
||||||
if (dryRun) {
|
if (dryRun) {
|
||||||
return (0, true);
|
return (0, true);
|
||||||
|
@@ -22,11 +22,9 @@ 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";
|
||||||
import "./mixins/MixinUniswapV3.sol";
|
|
||||||
import "./mixins/MixinWOOFi.sol";
|
import "./mixins/MixinWOOFi.sol";
|
||||||
import "./mixins/MixinZeroExBridge.sol";
|
import "./mixins/MixinZeroExBridge.sol";
|
||||||
|
|
||||||
@@ -37,11 +35,9 @@ contract BSCBridgeAdapter is
|
|||||||
MixinDodoV2,
|
MixinDodoV2,
|
||||||
MixinKyberDmm,
|
MixinKyberDmm,
|
||||||
MixinKyberElastic,
|
MixinKyberElastic,
|
||||||
MixinMaverickV1,
|
|
||||||
MixinMooniswap,
|
MixinMooniswap,
|
||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinUniswapV2,
|
MixinUniswapV2,
|
||||||
MixinUniswapV3,
|
|
||||||
MixinWOOFi,
|
MixinWOOFi,
|
||||||
MixinZeroExBridge
|
MixinZeroExBridge
|
||||||
{
|
{
|
||||||
@@ -65,11 +61,6 @@ contract BSCBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
||||||
} else if (protocolId == BridgeProtocols.UNISWAPV3) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV3(sellToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.MOONISWAP) {
|
} else if (protocolId == BridgeProtocols.MOONISWAP) {
|
||||||
if (dryRun) {
|
if (dryRun) {
|
||||||
return (0, true);
|
return (0, true);
|
||||||
@@ -105,11 +96,6 @@ 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);
|
||||||
|
@@ -1,93 +0,0 @@
|
|||||||
// 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 "./AbstractBridgeAdapter.sol";
|
|
||||||
import "./BridgeProtocols.sol";
|
|
||||||
import "./mixins/MixinUniswapV3.sol";
|
|
||||||
import "./mixins/MixinUniswapV2.sol";
|
|
||||||
import "./mixins/MixinBalancerV2Batch.sol";
|
|
||||||
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"),
|
|
||||||
MixinUniswapV3,
|
|
||||||
MixinUniswapV2,
|
|
||||||
MixinBalancerV2Batch,
|
|
||||||
MixinCurve,
|
|
||||||
MixinCurveV2,
|
|
||||||
MixinMaverickV1,
|
|
||||||
MixinSolidly,
|
|
||||||
MixinVelodromeV2
|
|
||||||
{
|
|
||||||
constructor(IEtherToken weth) public MixinCurve(weth) {}
|
|
||||||
|
|
||||||
function _trade(
|
|
||||||
BridgeOrder memory order,
|
|
||||||
IERC20Token sellToken,
|
|
||||||
IERC20Token buyToken,
|
|
||||||
uint256 sellAmount,
|
|
||||||
bool dryRun
|
|
||||||
) internal override returns (uint256 boughtAmount, bool supportedSource) {
|
|
||||||
uint128 protocolId = uint128(uint256(order.source) >> 128);
|
|
||||||
if (protocolId == BridgeProtocols.CURVE) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeCurve(sellToken, buyToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.CURVEV2) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeCurveV2(sellToken, buyToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.UNISWAPV3) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV3(sellToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.UNISWAPV2) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.SOLIDLY) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeSolidly(sellToken, buyToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.BALANCERV2BATCH) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeBalancerV2Batch(sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.MAVERICKV1) {
|
|
||||||
if (dryRun) {
|
|
||||||
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,45 +0,0 @@
|
|||||||
// 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 "./AbstractBridgeAdapter.sol";
|
|
||||||
import "./BridgeProtocols.sol";
|
|
||||||
import "./mixins/MixinUniswapV3.sol";
|
|
||||||
import "./mixins/MixinUniswapV2.sol";
|
|
||||||
|
|
||||||
contract BaseGoerliBridgeAdapter is AbstractBridgeAdapter(84531, "Base Goerli"), MixinUniswapV3, MixinUniswapV2 {
|
|
||||||
function _trade(
|
|
||||||
BridgeOrder memory order,
|
|
||||||
IERC20Token sellToken,
|
|
||||||
IERC20Token buyToken,
|
|
||||||
uint256 sellAmount,
|
|
||||||
bool dryRun
|
|
||||||
) internal override returns (uint256 boughtAmount, bool supportedSource) {
|
|
||||||
uint128 protocolId = uint128(uint256(order.source) >> 128);
|
|
||||||
if (protocolId == BridgeProtocols.UNISWAPV3) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV3(sellToken, sellAmount, order.bridgeData);
|
|
||||||
} else if (protocolId == BridgeProtocols.UNISWAPV2) {
|
|
||||||
if (dryRun) {
|
|
||||||
return (0, true);
|
|
||||||
}
|
|
||||||
boughtAmount = _tradeUniswapV2(buyToken, sellAmount, order.bridgeData);
|
|
||||||
}
|
|
||||||
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -57,6 +57,4 @@ library BridgeProtocols {
|
|||||||
uint128 internal constant KYBERELASTIC = 33;
|
uint128 internal constant KYBERELASTIC = 33;
|
||||||
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 MAVERICKV1 = 37;
|
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,6 @@ 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";
|
||||||
@@ -57,7 +56,6 @@ contract EthereumBridgeAdapter is
|
|||||||
MixinKyberElastic,
|
MixinKyberElastic,
|
||||||
MixinLido,
|
MixinLido,
|
||||||
MixinMakerPSM,
|
MixinMakerPSM,
|
||||||
MixinMaverickV1,
|
|
||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinSynthetix,
|
MixinSynthetix,
|
||||||
MixinUniswap,
|
MixinUniswap,
|
||||||
@@ -177,11 +175,6 @@ 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);
|
||||||
|
@@ -26,7 +26,6 @@ import "./mixins/MixinNerve.sol";
|
|||||||
import "./mixins/MixinSolidly.sol";
|
import "./mixins/MixinSolidly.sol";
|
||||||
import "./mixins/MixinSynthetix.sol";
|
import "./mixins/MixinSynthetix.sol";
|
||||||
import "./mixins/MixinUniswapV3.sol";
|
import "./mixins/MixinUniswapV3.sol";
|
||||||
import "./mixins/MixinVelodromeV2.sol";
|
|
||||||
import "./mixins/MixinWOOFi.sol";
|
import "./mixins/MixinWOOFi.sol";
|
||||||
import "./mixins/MixinZeroExBridge.sol";
|
import "./mixins/MixinZeroExBridge.sol";
|
||||||
|
|
||||||
@@ -40,7 +39,6 @@ contract OptimismBridgeAdapter is
|
|||||||
MixinNerve,
|
MixinNerve,
|
||||||
MixinSynthetix,
|
MixinSynthetix,
|
||||||
MixinUniswapV3,
|
MixinUniswapV3,
|
||||||
MixinVelodromeV2,
|
|
||||||
MixinSolidly,
|
MixinSolidly,
|
||||||
MixinWOOFi,
|
MixinWOOFi,
|
||||||
MixinZeroExBridge
|
MixinZeroExBridge
|
||||||
@@ -111,11 +109,6 @@ contract OptimismBridgeAdapter is
|
|||||||
return (0, true);
|
return (0, true);
|
||||||
}
|
}
|
||||||
boughtAmount = _tradeKyberElastic(sellToken, sellAmount, order.bridgeData);
|
boughtAmount = _tradeKyberElastic(sellToken, 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);
|
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
||||||
|
@@ -1,63 +0,0 @@
|
|||||||
// 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
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -31,18 +31,6 @@ interface IUniswapV3Router {
|
|||||||
function exactInput(ExactInputParams memory params) external payable returns (uint256 amountOut);
|
function exactInput(ExactInputParams memory params) external payable returns (uint256 amountOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/Uniswap/swap-router-contracts/blob/main/contracts/interfaces/IV3SwapRouter.sol
|
|
||||||
interface IUniswapV3Router2 {
|
|
||||||
struct ExactInputParams {
|
|
||||||
bytes path;
|
|
||||||
address recipient;
|
|
||||||
uint256 amountIn;
|
|
||||||
uint256 amountOutMinimum;
|
|
||||||
}
|
|
||||||
|
|
||||||
function exactInput(ExactInputParams memory params) external payable returns (uint256 amountOut);
|
|
||||||
}
|
|
||||||
|
|
||||||
contract MixinUniswapV3 {
|
contract MixinUniswapV3 {
|
||||||
using LibERC20TokenV06 for IERC20Token;
|
using LibERC20TokenV06 for IERC20Token;
|
||||||
|
|
||||||
@@ -51,30 +39,19 @@ contract MixinUniswapV3 {
|
|||||||
uint256 sellAmount,
|
uint256 sellAmount,
|
||||||
bytes memory bridgeData
|
bytes memory bridgeData
|
||||||
) internal returns (uint256 boughtAmount) {
|
) internal returns (uint256 boughtAmount) {
|
||||||
(address router, bytes memory path, uint256 routerVersion) = abi.decode(bridgeData, (address, bytes, uint256));
|
(IUniswapV3Router router, bytes memory path) = abi.decode(bridgeData, (IUniswapV3Router, bytes));
|
||||||
|
|
||||||
// Grant the Uniswap router an allowance to sell the sell token.
|
// Grant the Uniswap router an allowance to sell the sell token.
|
||||||
sellToken.approveIfBelow(router, sellAmount);
|
sellToken.approveIfBelow(address(router), sellAmount);
|
||||||
|
|
||||||
if (routerVersion != 2) {
|
boughtAmount = router.exactInput(
|
||||||
boughtAmount = IUniswapV3Router(router).exactInput(
|
IUniswapV3Router.ExactInputParams({
|
||||||
IUniswapV3Router.ExactInputParams({
|
path: path,
|
||||||
path: path,
|
recipient: address(this),
|
||||||
recipient: address(this),
|
deadline: block.timestamp,
|
||||||
deadline: block.timestamp,
|
amountIn: sellAmount,
|
||||||
amountIn: sellAmount,
|
amountOutMinimum: 1
|
||||||
amountOutMinimum: 1
|
})
|
||||||
})
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
boughtAmount = IUniswapV3Router2(router).exactInput(
|
|
||||||
IUniswapV3Router2.ExactInputParams({
|
|
||||||
path: path,
|
|
||||||
recipient: address(this),
|
|
||||||
amountIn: sellAmount,
|
|
||||||
amountOutMinimum: 1
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,69 +0,0 @@
|
|||||||
// 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 IVelodromeV2Router {
|
|
||||||
struct Route {
|
|
||||||
address from;
|
|
||||||
address to;
|
|
||||||
bool stable;
|
|
||||||
address factory;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @notice Swap one token for another
|
|
||||||
/// @param amountIn Amount of token in
|
|
||||||
/// @param amountOutMin Minimum amount of desired token received
|
|
||||||
/// @param routes Array of trade routes used in the swap
|
|
||||||
/// @param to Recipient of the tokens received
|
|
||||||
/// @param deadline Deadline to receive tokens
|
|
||||||
/// @return amounts Array of amounts returned per route
|
|
||||||
function swapExactTokensForTokens(
|
|
||||||
uint256 amountIn,
|
|
||||||
uint256 amountOutMin,
|
|
||||||
Route[] calldata routes,
|
|
||||||
address to,
|
|
||||||
uint256 deadline
|
|
||||||
) external returns (uint256[] memory amounts);
|
|
||||||
}
|
|
||||||
|
|
||||||
contract MixinVelodromeV2 {
|
|
||||||
using LibERC20TokenV06 for IERC20Token;
|
|
||||||
|
|
||||||
function _tradeVelodromeV2(
|
|
||||||
IERC20Token sellToken,
|
|
||||||
uint256 sellAmount,
|
|
||||||
bytes memory bridgeData
|
|
||||||
) internal returns (uint256 boughtAmount) {
|
|
||||||
(IVelodromeV2Router router, IVelodromeV2Router.Route[] memory routes) = abi.decode(
|
|
||||||
bridgeData,
|
|
||||||
(IVelodromeV2Router, IVelodromeV2Router.Route[])
|
|
||||||
);
|
|
||||||
sellToken.approveIfBelow(address(router), sellAmount);
|
|
||||||
|
|
||||||
uint256[] memory amounts = router.swapExactTokensForTokens(
|
|
||||||
sellAmount,
|
|
||||||
1,
|
|
||||||
routes,
|
|
||||||
address(this),
|
|
||||||
block.timestamp + 1
|
|
||||||
);
|
|
||||||
|
|
||||||
return amounts[amounts.length - 1];
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-zero-ex",
|
"name": "@0x/contracts-zero-ex",
|
||||||
"version": "0.49.0",
|
"version": "0.44.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -36,9 +36,9 @@
|
|||||||
"typechain": "typechain --target=ethers-v5 --out-dir='typechain-wrappers' './foundry-artifacts/**/*.json'"
|
"typechain": "typechain --target=ethers-v5 --out-dir='typechain-wrappers' './foundry-artifacts/**/*.json'"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"publicInterfaceContracts": "IZeroEx,ZeroEx,FullMigration,InitialMigration,IFlashWallet,IERC20Transformer,IOwnableFeature,ISimpleFunctionRegistryFeature,ITransformERC20Feature,FillQuoteTransformer,PayTakerTransformer,PositiveSlippageFeeTransformer,WethTransformer,OwnableFeature,SimpleFunctionRegistryFeature,TransformERC20Feature,AffiliateFeeTransformer,MetaTransactionsFeature,LogMetadataTransformer,LiquidityProviderFeature,ILiquidityProviderFeature,NativeOrdersFeature,INativeOrdersFeature,FeeCollectorController,FeeCollector,CurveLiquidityProvider,BatchFillNativeOrdersFeature,IBatchFillNativeOrdersFeature,MultiplexFeature,IMultiplexFeature,OtcOrdersFeature,IOtcOrdersFeature,AvalancheBridgeAdapter,BaseGoerliBridgeAdapter,BaseBridgeAdapter,BSCBridgeAdapter,CeloBridgeAdapter,EthereumBridgeAdapter,FantomBridgeAdapter,OptimismBridgeAdapter,PolygonBridgeAdapter,MetaTransactionsFeatureV2",
|
"publicInterfaceContracts": "IZeroEx,ZeroEx,FullMigration,InitialMigration,IFlashWallet,IERC20Transformer,IOwnableFeature,ISimpleFunctionRegistryFeature,ITransformERC20Feature,FillQuoteTransformer,PayTakerTransformer,PositiveSlippageFeeTransformer,WethTransformer,OwnableFeature,SimpleFunctionRegistryFeature,TransformERC20Feature,AffiliateFeeTransformer,MetaTransactionsFeature,LogMetadataTransformer,LiquidityProviderFeature,ILiquidityProviderFeature,NativeOrdersFeature,INativeOrdersFeature,FeeCollectorController,FeeCollector,CurveLiquidityProvider,BatchFillNativeOrdersFeature,IBatchFillNativeOrdersFeature,MultiplexFeature,IMultiplexFeature,OtcOrdersFeature,IOtcOrdersFeature,AvalancheBridgeAdapter,BSCBridgeAdapter,CeloBridgeAdapter,EthereumBridgeAdapter,FantomBridgeAdapter,OptimismBridgeAdapter,PolygonBridgeAdapter,MetaTransactionsFeatureV2",
|
||||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
|
||||||
"abis": "./test/generated-artifacts/@(AbstractBridgeAdapter|AffiliateFeeTransformer|ArbitrumBridgeAdapter|AvalancheBridgeAdapter|BSCBridgeAdapter|BaseBridgeAdapter|BaseGoerliBridgeAdapter|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeProtocols|CeloBridgeAdapter|CurveLiquidityProvider|ERC1155OrdersFeature|ERC165Feature|ERC721OrdersFeature|EthereumBridgeAdapter|FantomBridgeAdapter|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinERC1155Spender|FixinERC721Spender|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|FundRecoveryFeature|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC1155OrdersFeature|IERC1155Token|IERC165Feature|IERC20Bridge|IERC20Transformer|IERC721OrdersFeature|IERC721Token|IFeature|IFeeRecipient|IFlashWallet|IFundRecoveryFeature|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMetaTransactionsFeatureV2|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|IPropertyValidator|ISimpleFunctionRegistryFeature|IStaking|ITakerCallback|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC1155OrdersStorage|LibERC20Transformer|LibERC721OrdersStorage|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNFTOrder|LibNFTOrdersRichErrors|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MetaTransactionsFeatureV2|MixinAaveV2|MixinBalancer|MixinBalancerV2Batch|MixinBancorV3|MixinCompound|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinGMX|MixinKyberDmm|MixinLido|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinPlatypus|MixinSolidly|MixinSynthetix|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|MultiplexLiquidityProvider|MultiplexOtc|MultiplexRfq|MultiplexTransformERC20|MultiplexUniswapV2|MultiplexUniswapV3|NFTOrders|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OptimismBridgeAdapter|OtcOrdersFeature|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PolygonBridgeAdapter|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFeeRecipient|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC1155Token|TestMintableERC20Token|TestMintableERC721Token|TestMooniswap|TestNFTOrderPresigner|TestNativeOrdersFeature|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestPropertyValidator|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV2Factory|TestUniswapV2Pool|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|WethTransformer|ZeroEx|ZeroExOptimized).json"
|
"abis": "./test/generated-artifacts/@(AbstractBridgeAdapter|AffiliateFeeTransformer|ArbitrumBridgeAdapter|AvalancheBridgeAdapter|BSCBridgeAdapter|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeProtocols|CeloBridgeAdapter|CurveLiquidityProvider|ERC1155OrdersFeature|ERC165Feature|ERC721OrdersFeature|EthereumBridgeAdapter|FantomBridgeAdapter|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinERC1155Spender|FixinERC721Spender|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|FundRecoveryFeature|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC1155OrdersFeature|IERC1155Token|IERC165Feature|IERC20Bridge|IERC20Transformer|IERC721OrdersFeature|IERC721Token|IFeature|IFeeRecipient|IFlashWallet|IFundRecoveryFeature|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMetaTransactionsFeatureV2|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOtcOrdersFeature|IOwnableFeature|IPancakeSwapFeature|IPropertyValidator|ISimpleFunctionRegistryFeature|IStaking|ITakerCallback|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IUniswapV3Feature|IUniswapV3Pool|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC1155OrdersStorage|LibERC20Transformer|LibERC721OrdersStorage|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNFTOrder|LibNFTOrdersRichErrors|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOtcOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MetaTransactionsFeatureV2|MixinAaveV2|MixinBalancer|MixinBalancerV2Batch|MixinBancorV3|MixinCompound|MixinCryptoCom|MixinCurve|MixinCurveV2|MixinDodo|MixinDodoV2|MixinGMX|MixinKyberDmm|MixinLido|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinPlatypus|MixinSolidly|MixinSynthetix|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|MultiplexLiquidityProvider|MultiplexOtc|MultiplexRfq|MultiplexTransformERC20|MultiplexUniswapV2|MultiplexUniswapV3|NFTOrders|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OptimismBridgeAdapter|OtcOrdersFeature|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PolygonBridgeAdapter|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFeeRecipient|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC1155Token|TestMintableERC20Token|TestMintableERC721Token|TestMooniswap|TestNFTOrderPresigner|TestNativeOrdersFeature|TestNoEthRecipient|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestPropertyValidator|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestUniswapV2Factory|TestUniswapV2Pool|TestUniswapV3Factory|TestUniswapV3Feature|TestUniswapV3Pool|TestWeth|TestWethTransformerHost|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|UniswapV3Feature|WethTransformer|ZeroEx|ZeroExOptimized).json"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -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.13.0",
|
"@0x/contract-addresses": "^8.7.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.60",
|
"@0x/contracts-test-utils": "^5.4.54",
|
||||||
"@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.24.2",
|
"@0x/protocol-utils": "^11.22.2",
|
||||||
"@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",
|
||||||
|
@@ -7,8 +7,6 @@ import { ContractArtifact } from 'ethereum-types';
|
|||||||
|
|
||||||
import * as AffiliateFeeTransformer from '../generated-artifacts/AffiliateFeeTransformer.json';
|
import * as AffiliateFeeTransformer from '../generated-artifacts/AffiliateFeeTransformer.json';
|
||||||
import * as AvalancheBridgeAdapter from '../generated-artifacts/AvalancheBridgeAdapter.json';
|
import * as AvalancheBridgeAdapter from '../generated-artifacts/AvalancheBridgeAdapter.json';
|
||||||
import * as BaseBridgeAdapter from '../generated-artifacts/BaseBridgeAdapter.json';
|
|
||||||
import * as BaseGoerliBridgeAdapter from '../generated-artifacts/BaseGoerliBridgeAdapter.json';
|
|
||||||
import * as BatchFillNativeOrdersFeature from '../generated-artifacts/BatchFillNativeOrdersFeature.json';
|
import * as BatchFillNativeOrdersFeature from '../generated-artifacts/BatchFillNativeOrdersFeature.json';
|
||||||
import * as BSCBridgeAdapter from '../generated-artifacts/BSCBridgeAdapter.json';
|
import * as BSCBridgeAdapter from '../generated-artifacts/BSCBridgeAdapter.json';
|
||||||
import * as CeloBridgeAdapter from '../generated-artifacts/CeloBridgeAdapter.json';
|
import * as CeloBridgeAdapter from '../generated-artifacts/CeloBridgeAdapter.json';
|
||||||
@@ -81,8 +79,6 @@ export const artifacts = {
|
|||||||
OtcOrdersFeature: OtcOrdersFeature as ContractArtifact,
|
OtcOrdersFeature: OtcOrdersFeature as ContractArtifact,
|
||||||
IOtcOrdersFeature: IOtcOrdersFeature as ContractArtifact,
|
IOtcOrdersFeature: IOtcOrdersFeature as ContractArtifact,
|
||||||
AvalancheBridgeAdapter: AvalancheBridgeAdapter as ContractArtifact,
|
AvalancheBridgeAdapter: AvalancheBridgeAdapter as ContractArtifact,
|
||||||
BaseGoerliBridgeAdapter: BaseGoerliBridgeAdapter as ContractArtifact,
|
|
||||||
BaseBridgeAdapter: BaseBridgeAdapter as ContractArtifact,
|
|
||||||
BSCBridgeAdapter: BSCBridgeAdapter as ContractArtifact,
|
BSCBridgeAdapter: BSCBridgeAdapter as ContractArtifact,
|
||||||
CeloBridgeAdapter: CeloBridgeAdapter as ContractArtifact,
|
CeloBridgeAdapter: CeloBridgeAdapter as ContractArtifact,
|
||||||
EthereumBridgeAdapter: EthereumBridgeAdapter as ContractArtifact,
|
EthereumBridgeAdapter: EthereumBridgeAdapter as ContractArtifact,
|
||||||
|
@@ -6,8 +6,6 @@
|
|||||||
export * from '../generated-wrappers/affiliate_fee_transformer';
|
export * from '../generated-wrappers/affiliate_fee_transformer';
|
||||||
export * from '../generated-wrappers/avalanche_bridge_adapter';
|
export * from '../generated-wrappers/avalanche_bridge_adapter';
|
||||||
export * from '../generated-wrappers/b_s_c_bridge_adapter';
|
export * from '../generated-wrappers/b_s_c_bridge_adapter';
|
||||||
export * from '../generated-wrappers/base_bridge_adapter';
|
|
||||||
export * from '../generated-wrappers/base_goerli_bridge_adapter';
|
|
||||||
export * from '../generated-wrappers/batch_fill_native_orders_feature';
|
export * from '../generated-wrappers/batch_fill_native_orders_feature';
|
||||||
export * from '../generated-wrappers/celo_bridge_adapter';
|
export * from '../generated-wrappers/celo_bridge_adapter';
|
||||||
export * from '../generated-wrappers/curve_liquidity_provider';
|
export * from '../generated-wrappers/curve_liquidity_provider';
|
||||||
|
@@ -9,8 +9,6 @@ import * as AbstractBridgeAdapter from '../test/generated-artifacts/AbstractBrid
|
|||||||
import * as AffiliateFeeTransformer from '../test/generated-artifacts/AffiliateFeeTransformer.json';
|
import * as AffiliateFeeTransformer from '../test/generated-artifacts/AffiliateFeeTransformer.json';
|
||||||
import * as ArbitrumBridgeAdapter from '../test/generated-artifacts/ArbitrumBridgeAdapter.json';
|
import * as ArbitrumBridgeAdapter from '../test/generated-artifacts/ArbitrumBridgeAdapter.json';
|
||||||
import * as AvalancheBridgeAdapter from '../test/generated-artifacts/AvalancheBridgeAdapter.json';
|
import * as AvalancheBridgeAdapter from '../test/generated-artifacts/AvalancheBridgeAdapter.json';
|
||||||
import * as BaseBridgeAdapter from '../test/generated-artifacts/BaseBridgeAdapter.json';
|
|
||||||
import * as BaseGoerliBridgeAdapter from '../test/generated-artifacts/BaseGoerliBridgeAdapter.json';
|
|
||||||
import * as BatchFillNativeOrdersFeature from '../test/generated-artifacts/BatchFillNativeOrdersFeature.json';
|
import * as BatchFillNativeOrdersFeature from '../test/generated-artifacts/BatchFillNativeOrdersFeature.json';
|
||||||
import * as BootstrapFeature from '../test/generated-artifacts/BootstrapFeature.json';
|
import * as BootstrapFeature from '../test/generated-artifacts/BootstrapFeature.json';
|
||||||
import * as BridgeProtocols from '../test/generated-artifacts/BridgeProtocols.json';
|
import * as BridgeProtocols from '../test/generated-artifacts/BridgeProtocols.json';
|
||||||
@@ -321,8 +319,6 @@ export const artifacts = {
|
|||||||
ArbitrumBridgeAdapter: ArbitrumBridgeAdapter as ContractArtifact,
|
ArbitrumBridgeAdapter: ArbitrumBridgeAdapter as ContractArtifact,
|
||||||
AvalancheBridgeAdapter: AvalancheBridgeAdapter as ContractArtifact,
|
AvalancheBridgeAdapter: AvalancheBridgeAdapter as ContractArtifact,
|
||||||
BSCBridgeAdapter: BSCBridgeAdapter as ContractArtifact,
|
BSCBridgeAdapter: BSCBridgeAdapter as ContractArtifact,
|
||||||
BaseBridgeAdapter: BaseBridgeAdapter as ContractArtifact,
|
|
||||||
BaseGoerliBridgeAdapter: BaseGoerliBridgeAdapter as ContractArtifact,
|
|
||||||
BridgeProtocols: BridgeProtocols as ContractArtifact,
|
BridgeProtocols: BridgeProtocols as ContractArtifact,
|
||||||
CeloBridgeAdapter: CeloBridgeAdapter as ContractArtifact,
|
CeloBridgeAdapter: CeloBridgeAdapter as ContractArtifact,
|
||||||
EthereumBridgeAdapter: EthereumBridgeAdapter as ContractArtifact,
|
EthereumBridgeAdapter: EthereumBridgeAdapter as ContractArtifact,
|
||||||
|
@@ -8,8 +8,6 @@ export * from '../test/generated-wrappers/affiliate_fee_transformer';
|
|||||||
export * from '../test/generated-wrappers/arbitrum_bridge_adapter';
|
export * from '../test/generated-wrappers/arbitrum_bridge_adapter';
|
||||||
export * from '../test/generated-wrappers/avalanche_bridge_adapter';
|
export * from '../test/generated-wrappers/avalanche_bridge_adapter';
|
||||||
export * from '../test/generated-wrappers/b_s_c_bridge_adapter';
|
export * from '../test/generated-wrappers/b_s_c_bridge_adapter';
|
||||||
export * from '../test/generated-wrappers/base_bridge_adapter';
|
|
||||||
export * from '../test/generated-wrappers/base_goerli_bridge_adapter';
|
|
||||||
export * from '../test/generated-wrappers/batch_fill_native_orders_feature';
|
export * from '../test/generated-wrappers/batch_fill_native_orders_feature';
|
||||||
export * from '../test/generated-wrappers/bootstrap_feature';
|
export * from '../test/generated-wrappers/bootstrap_feature';
|
||||||
export * from '../test/generated-wrappers/bridge_protocols';
|
export * from '../test/generated-wrappers/bridge_protocols';
|
||||||
|
@@ -1,35 +0,0 @@
|
|||||||
// 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/AvalancheBridgeAdapter.sol";
|
|
||||||
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
|
|
||||||
|
|
||||||
contract AvalancheBridgeAdapterTest is Test {
|
|
||||||
address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
|
|
||||||
|
|
||||||
AvalancheBridgeAdapter private adapter;
|
|
||||||
|
|
||||||
function setUp() public {
|
|
||||||
vm.chainId(43114);
|
|
||||||
adapter = new AvalancheBridgeAdapter(IEtherToken(WAVAX));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportsUniswapV3() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
// 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/BSCBridgeAdapter.sol";
|
|
||||||
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
|
|
||||||
|
|
||||||
contract BSCBridgeAdapterTest is Test {
|
|
||||||
address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;
|
|
||||||
|
|
||||||
BSCBridgeAdapter private adapter;
|
|
||||||
|
|
||||||
function setUp() public {
|
|
||||||
vm.chainId(56);
|
|
||||||
adapter = new BSCBridgeAdapter(IEtherToken(WBNB));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportsUniswapV3() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportMaverickV1() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,47 +0,0 @@
|
|||||||
// 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)));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportSolidly() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.SOLIDLY) << 128)));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportVelodromeV2() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.VELODROMEV2) << 128)));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
// 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,35 +0,0 @@
|
|||||||
// 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/OptimismBridgeAdapter.sol";
|
|
||||||
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
|
|
||||||
|
|
||||||
contract OptimismBridgeAdapterTest is Test {
|
|
||||||
address constant WETH = 0x4200000000000000000000000000000000000006;
|
|
||||||
|
|
||||||
OptimismBridgeAdapter private adapter;
|
|
||||||
|
|
||||||
function setUp() public {
|
|
||||||
vm.chainId(10);
|
|
||||||
adapter = new OptimismBridgeAdapter(IEtherToken(WETH));
|
|
||||||
}
|
|
||||||
|
|
||||||
function testSupportVelodromeV2() public {
|
|
||||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.VELODROMEV2) << 128)));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -6,8 +6,6 @@
|
|||||||
"generated-artifacts/AffiliateFeeTransformer.json",
|
"generated-artifacts/AffiliateFeeTransformer.json",
|
||||||
"generated-artifacts/AvalancheBridgeAdapter.json",
|
"generated-artifacts/AvalancheBridgeAdapter.json",
|
||||||
"generated-artifacts/BSCBridgeAdapter.json",
|
"generated-artifacts/BSCBridgeAdapter.json",
|
||||||
"generated-artifacts/BaseBridgeAdapter.json",
|
|
||||||
"generated-artifacts/BaseGoerliBridgeAdapter.json",
|
|
||||||
"generated-artifacts/BatchFillNativeOrdersFeature.json",
|
"generated-artifacts/BatchFillNativeOrdersFeature.json",
|
||||||
"generated-artifacts/CeloBridgeAdapter.json",
|
"generated-artifacts/CeloBridgeAdapter.json",
|
||||||
"generated-artifacts/CurveLiquidityProvider.json",
|
"generated-artifacts/CurveLiquidityProvider.json",
|
||||||
@@ -50,8 +48,6 @@
|
|||||||
"test/generated-artifacts/ArbitrumBridgeAdapter.json",
|
"test/generated-artifacts/ArbitrumBridgeAdapter.json",
|
||||||
"test/generated-artifacts/AvalancheBridgeAdapter.json",
|
"test/generated-artifacts/AvalancheBridgeAdapter.json",
|
||||||
"test/generated-artifacts/BSCBridgeAdapter.json",
|
"test/generated-artifacts/BSCBridgeAdapter.json",
|
||||||
"test/generated-artifacts/BaseBridgeAdapter.json",
|
|
||||||
"test/generated-artifacts/BaseGoerliBridgeAdapter.json",
|
|
||||||
"test/generated-artifacts/BatchFillNativeOrdersFeature.json",
|
"test/generated-artifacts/BatchFillNativeOrdersFeature.json",
|
||||||
"test/generated-artifacts/BootstrapFeature.json",
|
"test/generated-artifacts/BootstrapFeature.json",
|
||||||
"test/generated-artifacts/BridgeProtocols.json",
|
"test/generated-artifacts/BridgeProtocols.json",
|
||||||
|
@@ -66,8 +66,3 @@ Note: Some addresses have changed across various networks
|
|||||||
Avalanche, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://snowtrace.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
Avalanche, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://snowtrace.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
||||||
Fantom, `0xdef189deaef76e379df891899eb5a00a94cbc250 <https://ftmscan.com/address/0xdef189deaef76e379df891899eb5a00a94cbc250>`__
|
Fantom, `0xdef189deaef76e379df891899eb5a00a94cbc250 <https://ftmscan.com/address/0xdef189deaef76e379df891899eb5a00a94cbc250>`__
|
||||||
Celo, `0xdef1c0ded9bec7f1a1670819833240f027b25eff <https://explorer.celo.org/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff>`__
|
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>`__
|
|
||||||
|
@@ -2,21 +2,15 @@
|
|||||||
Protocol Fees
|
Protocol Fees
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
As of September 29, 2021, protocol fees have been removed for all order types in both Exchange V4 and V3 in accordance with `ZEIP-91 <https://0x.org/zrx/vote/zeip-91>`_.
|
||||||
|
|
||||||
An ETH protocol fee is paid by the Taker each time a `Limit Order <./orders.html#limit-orders>`_ is `filled <./functions.html>`_.
|
An ETH protocol fee is paid by the Taker each time a `Limit Order <./orders.html#limit-orders>`_ is `filled <./functions.html>`_.
|
||||||
The fee is proportional to the gas cost of filling an order and scales linearly with gas price. The cost is currently ``0 * tx.gasprice``.
|
The fee is proportional to the gas cost of filling an order and scales linearly with gas price. The cost is currently ``0 * tx.gasprice``.
|
||||||
At the end of every Staking Epoch, these fees are aggregated and distributed to the makers as a liquidity reward: the reward is proportional to the maker's collected fees and staked ZRX relative to other makers.
|
At the end of every Staking Epoch, these fees are aggregated and distributed to the makers as a liquidity reward: the reward is proportional to the maker's collected fees and staked ZRX relative to other makers.
|
||||||
To learn more about protocol fees and liquidity incentives, see the `Official Spec <https://github.com/0xProject/0x-protocol-specification/blob/master/staking/staking-specification.md>`_.
|
To learn more about protocol fees and liquidity incentives, see the `Official Spec <https://github.com/0xProject/0x-protocol-specification/blob/master/staking/staking-specification.md>`_.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
As of September 29, 2021, protocol fees have been removed for all order types in both Exchange V4 and V3 in accordance with `ZEIP-91 <https://0x.org/zrx/vote/zeip-91>`_.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
`RFQ Orders <./orders.html#rfq-orders>`_ are introduced in Exchange V4, and there is currently no protocol fee for filling this type of order.
|
|
||||||
The existing fee mechanics work well for limit orders, where arb bots pay to compete for liquidity; however, it does not translate well to RFQ where makers are matched with a specific taker.
|
|
||||||
We are researching fee models that could be used for RFQ and will keep the community up-to-date on our `Forum <https://forum.0x.org/>`_.
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
In Exchange V3, protocol fees could be paid in ETH or WETH. As of V4, they can only be paid in ETH.
|
In Exchange V3, protocol fees could be paid in ETH or WETH. As of V4, they can only be paid in ETH.
|
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"opRetro": {
|
|
||||||
"projectId": "0x0fad18f37ecec4f4f4ca18e60c353eb11462363e8aa14562b5d96af54108d106"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,61 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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": [
|
|
||||||
{
|
|
||||||
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1692368658
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "8.10.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add VelodromeV2 support on Optimism"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1691617396
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "8.9.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add Uniswap V3 router v2 support in Base FillQuoteTransformer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1689974915
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "8.8.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add Base mainnet addresses"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"note": "Add UniswapV3 support in Avalanche and BSC FillQuoteTransformers"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1689791426
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "8.7.0",
|
"version": "8.7.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -6,25 +6,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
## v8.10.0 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
|
||||||
## v8.9.0 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Add Uniswap V3 router v2 support in Base FillQuoteTransformer
|
|
||||||
## v8.8.0 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Add Base mainnet addresses
|
|
||||||
* Add UniswapV3 support in Avalanche and BSC FillQuoteTransformers
|
|
||||||
## v8.7.0 - _May 10, 2023_
|
## v8.7.0 - _May 10, 2023_
|
||||||
|
|
||||||
* Add Trader Joe V2 MixIn to Arbitrum
|
* Add Trader Joe V2 MixIn to Arbitrum
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
|
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
|
||||||
"payTakerTransformer": "0xea500d073652336a58846ada15c25f2c6d2d241f",
|
"payTakerTransformer": "0xea500d073652336a58846ada15c25f2c6d2d241f",
|
||||||
"affiliateFeeTransformer": "0x8146cbbe327364b13d0699f2ced39c637f92501a",
|
"affiliateFeeTransformer": "0x8146cbbe327364b13d0699f2ced39c637f92501a",
|
||||||
"fillQuoteTransformer": "0x2fd08c1f9fc8406c1d7e3a799a13883a7e7949f0",
|
"fillQuoteTransformer": "0x21c3bee93fad436dedd29f971dc4fdf82f3e3a3a",
|
||||||
"positiveSlippageFeeTransformer": "0x818a4a855bfeb16c305cb65e8d4fb239a308bc48"
|
"positiveSlippageFeeTransformer": "0x818a4a855bfeb16c305cb65e8d4fb239a308bc48"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
"wethTransformer": "0xac3d95668c092e895cd83a9cbafe9c7d9906471f",
|
||||||
"payTakerTransformer": "0x7e788f3a3e39cdd1944ba111fafc5fb7e59b5e90",
|
"payTakerTransformer": "0x7e788f3a3e39cdd1944ba111fafc5fb7e59b5e90",
|
||||||
"affiliateFeeTransformer": "0x043300d113de0c64684ab89c56a45cd94c7ef54c",
|
"affiliateFeeTransformer": "0x043300d113de0c64684ab89c56a45cd94c7ef54c",
|
||||||
"fillQuoteTransformer": "0x6073f12fc63bcc64bd4fed5d44aa1035e37d68ee",
|
"fillQuoteTransformer": "0x43d10801db01c28093265ef9b77d532e553fa578",
|
||||||
"positiveSlippageFeeTransformer": "0x6ff35e8cbaf56d8a8f6bf9963b902a4576243030"
|
"positiveSlippageFeeTransformer": "0x6ff35e8cbaf56d8a8f6bf9963b902a4576243030"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
"wethTransformer": "0x9b8b52391071d71cd4ad1e61d7f273268fa34c6c",
|
"wethTransformer": "0x9b8b52391071d71cd4ad1e61d7f273268fa34c6c",
|
||||||
"payTakerTransformer": "0xb9a4c32547bc3cdc2ee2fb13cc1a0717dac9888f",
|
"payTakerTransformer": "0xb9a4c32547bc3cdc2ee2fb13cc1a0717dac9888f",
|
||||||
"affiliateFeeTransformer": "0x105679f99d668001370b4621ad8648ac570c860f",
|
"affiliateFeeTransformer": "0x105679f99d668001370b4621ad8648ac570c860f",
|
||||||
"fillQuoteTransformer": "0x463fe1a80acb62ce1e4f0a4f7b83df674c2cce2c",
|
"fillQuoteTransformer": "0x886e4f97d7e06ab66dba574a7a861046dcf7ae4f",
|
||||||
"positiveSlippageFeeTransformer": "0xadbfdc58a24b6dbc16f21541800f43dd6e282250"
|
"positiveSlippageFeeTransformer": "0xadbfdc58a24b6dbc16f21541800f43dd6e282250"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
"wethTransformer": "0x02ce7af6520e2862f961f5d7eda746642865179c",
|
"wethTransformer": "0x02ce7af6520e2862f961f5d7eda746642865179c",
|
||||||
"payTakerTransformer": "0xa6c3ca183a67fcb4299fb4199c12ca74874ca489",
|
"payTakerTransformer": "0xa6c3ca183a67fcb4299fb4199c12ca74874ca489",
|
||||||
"affiliateFeeTransformer": "0x3102aea537ecb6f164550b094663c82a8c53a972",
|
"affiliateFeeTransformer": "0x3102aea537ecb6f164550b094663c82a8c53a972",
|
||||||
"fillQuoteTransformer": "0x521f3184ab27abde4a34e744a908b1a08dc8ef91",
|
"fillQuoteTransformer": "0xd140adb61d4e3e3978d4f32ac6b92240ff6e3a6e",
|
||||||
"positiveSlippageFeeTransformer": "0x9a4947d3fb77a7afc2c9cd6714bbae96dddde059"
|
"positiveSlippageFeeTransformer": "0x9a4947d3fb77a7afc2c9cd6714bbae96dddde059"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -251,51 +251,5 @@
|
|||||||
"fillQuoteTransformer": "0x4a8815c2fc605e3b01aee52aade4d096c4e862c6",
|
"fillQuoteTransformer": "0x4a8815c2fc605e3b01aee52aade4d096c4e862c6",
|
||||||
"positiveSlippageFeeTransformer": "0x20f935b037e8490d8027f2751f9452725eee01ad"
|
"positiveSlippageFeeTransformer": "0x20f935b037e8490d8027f2751f9452725eee01ad"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"8453": {
|
|
||||||
"zrxToken": "0x0000000000000000000000000000000000000000",
|
|
||||||
"etherToken": "0x4200000000000000000000000000000000000006",
|
|
||||||
"zeroExGovernor": "0xecc4f2a8e0fd933623b2ea4ad84bffd12cb1286c",
|
|
||||||
"zrxVault": "0x0000000000000000000000000000000000000000",
|
|
||||||
"staking": "0x0000000000000000000000000000000000000000",
|
|
||||||
"stakingProxy": "0x0000000000000000000000000000000000000000",
|
|
||||||
"erc20BridgeProxy": "0x0000000000000000000000000000000000000000",
|
|
||||||
"erc20BridgeSampler": "0x0000000000000000000000000000000000000000",
|
|
||||||
"exchangeProxyGovernor": "0xecc4f2a8e0fd933623b2ea4ad84bffd12cb1286c",
|
|
||||||
"exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
|
|
||||||
"exchangeProxyTransformerDeployer": "0x58bca53ebba1aaf25f0edcd8dad6421872fe20b2",
|
|
||||||
"exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498",
|
|
||||||
"exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000",
|
|
||||||
"zrxTreasury": "0x0000000000000000000000000000000000000000",
|
|
||||||
"transformers": {
|
|
||||||
"wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
|
||||||
"payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
|
||||||
"affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066",
|
|
||||||
"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",
|
"name": "@0x/contract-addresses",
|
||||||
"version": "8.13.0",
|
"version": "8.7.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@@ -1,16 +1,20 @@
|
|||||||
import addresses from '../addresses.json';
|
import addresses from '../addresses.json';
|
||||||
|
|
||||||
export interface ContractAddresses {
|
export interface ContractAddresses {
|
||||||
erc20BridgeProxy: string;
|
zrxToken: string;
|
||||||
erc20BridgeSampler: string;
|
|
||||||
etherToken: string;
|
etherToken: string;
|
||||||
exchangeProxy: string;
|
zeroExGovernor: string;
|
||||||
exchangeProxyFlashWallet: string;
|
zrxVault: string;
|
||||||
exchangeProxyGovernor: string;
|
|
||||||
exchangeProxyLiquidityProviderSandbox: string;
|
|
||||||
exchangeProxyTransformerDeployer: string;
|
|
||||||
staking: string;
|
staking: string;
|
||||||
stakingProxy: string;
|
stakingProxy: string;
|
||||||
|
erc20BridgeProxy: string;
|
||||||
|
erc20BridgeSampler: string;
|
||||||
|
exchangeProxyGovernor: string;
|
||||||
|
exchangeProxy: string;
|
||||||
|
exchangeProxyTransformerDeployer: string;
|
||||||
|
exchangeProxyFlashWallet: string;
|
||||||
|
exchangeProxyLiquidityProviderSandbox: string;
|
||||||
|
zrxTreasury: string;
|
||||||
transformers: {
|
transformers: {
|
||||||
wethTransformer: string;
|
wethTransformer: string;
|
||||||
payTakerTransformer: string;
|
payTakerTransformer: string;
|
||||||
@@ -18,33 +22,20 @@ export interface ContractAddresses {
|
|||||||
affiliateFeeTransformer: string;
|
affiliateFeeTransformer: string;
|
||||||
positiveSlippageFeeTransformer: string;
|
positiveSlippageFeeTransformer: string;
|
||||||
};
|
};
|
||||||
zeroExGovernor: string;
|
|
||||||
zrxToken: string;
|
|
||||||
zrxTreasury: string;
|
|
||||||
zrxVault: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChainId {
|
export enum ChainId {
|
||||||
Mainnet = 1,
|
Mainnet = 1,
|
||||||
Goerli = 5,
|
Goerli = 5,
|
||||||
Optimism = 10,
|
Ganache = 1337,
|
||||||
BSC = 56,
|
BSC = 56,
|
||||||
Polygon = 137,
|
Polygon = 137,
|
||||||
Fantom = 250,
|
|
||||||
Ganache = 1337,
|
|
||||||
Base = 8453,
|
|
||||||
Arbitrum = 42161,
|
|
||||||
Avalanche = 43114,
|
|
||||||
Celo = 42220,
|
|
||||||
PolygonMumbai = 80001,
|
PolygonMumbai = 80001,
|
||||||
Sepolia = 11155111
|
Avalanche = 43114,
|
||||||
}
|
Fantom = 250,
|
||||||
|
Celo = 42220,
|
||||||
/**
|
Optimism = 10,
|
||||||
* Narrow a JavaScript number to a Chain ID.
|
Arbitrum = 42161,
|
||||||
*/
|
|
||||||
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 { bufferToHex, rlphash } from 'ethereumjs-util';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
import { ChainId, getContractAddressesForChainOrThrow, isChainId } from '../src';
|
import { ChainId, getContractAddressesForChainOrThrow } from '../src';
|
||||||
|
|
||||||
const expect = chai.expect;
|
const expect = chai.expect;
|
||||||
|
|
||||||
@@ -68,12 +68,3 @@ 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,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1691617396,
|
|
||||||
"version": "13.23.5",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "13.23.4",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "13.23.3",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "13.23.2",
|
"version": "13.23.2",
|
||||||
|
@@ -6,24 +6,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
## v13.23.5 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
## v13.23.4 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
## v13.23.3 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
## v13.23.2 - _May 10, 2023_
|
## v13.23.2 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-wrappers",
|
"name": "@0x/contract-wrappers",
|
||||||
"version": "13.23.8",
|
"version": "13.23.2",
|
||||||
"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.13.0",
|
"@0x/contract-addresses": "^8.7.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,58 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"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": [
|
|
||||||
{
|
|
||||||
"note": "Add MaverickV1 support on Ethereum, BSC, and Base"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1692368658
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "11.23.0",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Add VelodromeV2 support on Optimism"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1691617396
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689974915,
|
|
||||||
"version": "11.22.4",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"timestamp": 1689791426,
|
|
||||||
"version": "11.22.3",
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"note": "Dependencies updated"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"timestamp": 1683749017,
|
"timestamp": 1683749017,
|
||||||
"version": "11.22.2",
|
"version": "11.22.2",
|
||||||
|
@@ -6,24 +6,6 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
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
|
|
||||||
## v11.23.0 - _August 9, 2023_
|
|
||||||
|
|
||||||
* Add VelodromeV2 support on Optimism
|
|
||||||
## v11.22.4 - _July 21, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
## v11.22.3 - _July 19, 2023_
|
|
||||||
|
|
||||||
* Dependencies updated
|
|
||||||
## v11.22.2 - _May 10, 2023_
|
## v11.22.2 - _May 10, 2023_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/protocol-utils",
|
"name": "@0x/protocol-utils",
|
||||||
"version": "11.24.2",
|
"version": "11.22.2",
|
||||||
"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.13.0",
|
"@0x/contract-addresses": "^8.7.0",
|
||||||
"@0x/contract-wrappers": "^13.23.8",
|
"@0x/contract-wrappers": "^13.23.2",
|
||||||
"@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",
|
||||||
|
@@ -166,8 +166,6 @@ export enum BridgeProtocol {
|
|||||||
KyberElastic,
|
KyberElastic,
|
||||||
Barter,
|
Barter,
|
||||||
TraderJoeV2,
|
TraderJoeV2,
|
||||||
VelodromeV2,
|
|
||||||
MaverickV1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user