* added initial foundry transformERC20 tests * added foundry tests into CircleCI flow * add verbosity for failing tests in CI * revert wrong CI commands * feat: Foundry, added some more deployments (#558) * Added some more deployments * Rename WETH9 to WETH9V06 * Set to 0.6.x * fix typo * remove commit with bad prettier changes * working bridge Fills through weth transformer * remove unused reference * clean up tests * added working otc fill through transformERC20 in FQT * resolve file imports, add samplers, arbitrumBridgeAdatper, and new FQT version * add extra 'v' for debugging verbosity * add extra 'v' for debugging verbosity in circleci config * remove old traces * refactor rpc's out of foundry.toml and into .env for CI compatibility * remove verbosity from CI command as its now defined in foundry.toml * setup rpc's * ignore foundry artifacts in prettier * change naming in prettierignore * move /samplers to the tests subdirectory, modify remappings to reflext change * one more try 🤞 * change CI steps * remove yarn from CI step * get to the right directory * update foundry before tests * fix tip() deprecation and use deal() * use deal() instead of vm.deal() * try to get foundry to have the right directory structure by updating it * I HATE THIS * remove foundryup * Fix prettier issues * Remove obsoleted import * Use forge native commands to install deps and test and add the --root option * Try using forge with working-directory flag in CI * Use nightly foundry docker image * Update rpc endpoints config in foundry * move tests into /forked and /local * rename tests * add foundry profiles to CI * try to fix CI * 🔧 add foundry local and forked tests to workflow * prettier and lint * revert deps update * remove all samplers and add uniswapV2 sampler to ForkUtils * address jacobs comments * cleanup and comment * prettier and lint * bump contracts-zero-ex version * set func-name-mixedcase to off in solhint for elenas new changes * max line length to warn * add --fix for check-md * Update ci.yml * fix some nitpcks and leftover code * fix inconsistent naming * fix bridge adapter reverts and foundry cache * migrate foundry integration tests to /tests * refactor contract-addresses to use the contract-addresses package style nested json * fix solhint * fix contract linting errors * dont check broken links in libraries * move forge order in gh action for testing * add env instead of vars * try again * fix github actions ordering * update licence and address comments * remove verbosity from foundry.toml * fix contract lint * move back to emitting an event until samplers can be integrated as some chains dont have uniswap as a source * add uniswap v3 sampling code for future use * remove uniswap v3 code as its not used * fix lint Co-authored-by: Noah Khamliche <0xnoah@Noahs-MacBook-Pro-2.local> Co-authored-by: Jacob Evans <jacob@dekz.net> Co-authored-by: elenadimitrova <elena@arenabg.com>
89 lines
2.2 KiB
Markdown
89 lines
2.2 KiB
Markdown
## ZeroEx (ExchangeProxy)
|
|
|
|
This package contains contracts for the ZeroEx extensible contract architecture.
|
|
|
|
> **_NOTE:_** This repo is undergoing a tooling change. If adding a contract, you will need to
|
|
> add it to `compiler.json`. You can generate the entire list by running the following:
|
|
> `find . -type f -name "*.sol" | grep -v foundry | grep -v "contracts/dep" | grep -v "node_modules"`
|
|
|
|
## Installation
|
|
|
|
**Install**
|
|
|
|
```bash
|
|
npm install @0x/contracts-zero-ex --save
|
|
```
|
|
|
|
## Contributing
|
|
|
|
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
|
|
|
|
For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
|
|
|
|
Please read our [contribution guidelines](../../.github/CONTRIBUTING.md) before getting started.
|
|
|
|
### Install Dependencies
|
|
|
|
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
|
|
|
|
```bash
|
|
yarn config set workspaces-experimental true
|
|
```
|
|
|
|
Then install dependencies
|
|
|
|
```bash
|
|
yarn install
|
|
```
|
|
|
|
### Build
|
|
|
|
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
|
|
|
```bash
|
|
PKG=@0x/contracts-zero-ex yarn build
|
|
```
|
|
|
|
Or continuously rebuild on change:
|
|
|
|
```bash
|
|
PKG=@0x/contracts-zero-ex yarn watch
|
|
```
|
|
|
|
### Clean
|
|
|
|
```bash
|
|
yarn clean
|
|
```
|
|
|
|
### Lint
|
|
|
|
```bash
|
|
yarn lint
|
|
```
|
|
|
|
### Run Tests
|
|
|
|
```bash
|
|
yarn test
|
|
```
|
|
|
|
### Run Integration Tests
|
|
you will need to create a .env that the root of `/contracts/zero-ex` containing rpc's for all 7 chains the tests will be run on
|
|
|
|
```sh
|
|
ARBITRUM_RPC_URL=https://arb-mainnet........
|
|
AVALANCHE_RPC_URL=https://avalanche-mainnet......
|
|
BSC_RPC_URL=https://bsc-mainnet......
|
|
FANTOM_RPC_URL=https://fantom-mainnet......
|
|
MAINNET_RPC_URL=https://eth-mainnet......
|
|
OPTIMISM_RPC_URL=https://opt-mainnet......
|
|
POLYGON_RPC_URL=https://polygon-mainnet......
|
|
```
|
|
|
|
```bash
|
|
git submodule update --init --recursive
|
|
foundryup
|
|
yarn test:integration
|
|
```
|