238 Commits

Author SHA1 Message Date
Savarn Dontamsetti (Sav)
09419a7909
Adding Nerve Mixin to Arbitrum Bridge Adapter [TKR-554] (#579)
* adding Nerve Mixin to Arbitrum Bridge Adapter

* refactor bridgeAdapter to include currently deployed changes

* remove duplicate DODOV2

* removing DODO V1 from Arbitrum Bridge Adapter

* updating imports

* fixing CI: ganache tests

* Invalid caching configuration

Co-authored-by: Noah Khamliche <0xnoah@Noahs-MacBook-Pro-2.local>
Co-authored-by: Marcin Wolny <marcin@0xproject.com>
2022-09-20 10:54:50 -04:00
Marcin Wolny
1fb44a55b4
Invalid working_directory (#568)
* Invalid working_directory

Invalid working_directory leads to a bug where some of commands are
executed incorrect code version.

* Fix prettier
2022-08-31 16:37:39 +02:00
Marcin Wolny
416f2ec24c
CircleCI candies 🍬 (#550)
* Re-usable cache

By use of branch as a cache key, we invalidate the cache very often.
This leads to incresed builds time. By use of cache based on checksum of
yarn.lock, we may drop the build time.

It will increase the time every time checksum has changed. In our case,
it happens multiple times per month.

* Skip job run if no changes applied

* Skip tests if no changes applied

* Skip tests if no changes applied
2022-08-25 10:08:28 +02:00
Kyu
eb394383d8
chore: Deprecate asset-swapper [TKR-484] (#559)
* Add asset-swapper deprecation notice in README.md

* Remove asset-swapper references from the top-level README

* Remove asset-swapper from circleci config

* Set asset-swapper private to prevent it from being published

* Remove asset-swapper from `nonContractPackages`

* Disable asset-swapper build and test scripts
2022-08-24 09:30:52 +09:00
Kyu
08e0c2ebb9
chore: Add checks for addresses.json [TKR-519] (#549) 2022-08-10 17:35:38 +09:00
phil-ociraptor
4dae8de1b6
feat: add Foundry support to contracts/zero-ex (#534)
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
2022-08-08 11:46:50 -05:00
Kyu
7f4080e0a2
Delete packages/migrations (#488)
* Delete packages/migrations

* Remove 0x/migrations from asset-swapper dev dependency

* Remove 0x/migrations references
2022-06-02 10:00:50 -07:00
Lawrence Forman
470e9a4697
AS: Balancer V2 batchSwap (#462)
* Draft. PoC pseudo code showing general idea for resuing SOR path creation logic and adding multihop support.

* Add actual Balancer SDK function calls.

* Update to handle buys.

* Correct taker>maker for buy.

* Draft. PoC pseudo code showing general idea for resuing SOR path creation logic and adding multihop support.

* make it build

* rebase

* add BalancerV2Batch protocol

* add BalancerV2Batch protocol

* get balancer v2 multihop working

* fix BalancerV2Batch for sells (buys still iffy)

* fix buys, appease linter and prettier

* remove unused RPC URL from balancer sdk construction

* update changelogs

* clean up comments
add event loop yield in `BalancerV2SwapInfoCache.loadTopPools()`

* add negative result check on balancerv2batch swap output

* compiler hack

* reintroduce CompilerHack

* delete unused multibridge sampler

* remove compilerhack

* reintroduce compilerhack

* try to fix CI compile errors

* plz work

* plz work

* pretty plz work

* yay it works, also address feedback

* appease linter

* deploy new FQTs

Co-authored-by: johngrantuk <johngrantuk@googlemail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2022-04-22 02:43:41 -04:00
Kim Persson
c881723578
feat: use neon-router in CI tests (#453)
* fix: initially skip all tests that don't work with the Rust router

* fix: enable rust router for CircleCI tests

* fix: handle invalid output sampels & enable numSamples tests

* chore: add comments about disabled tests

* chore: add asset-swapper changelog entry
2022-03-31 14:32:59 +02:00
Jacob Evans
6073607d3e
chore: update Node16 (#384)
* Node 16

* update yarn.lock

* Update ganache-cli and merkle-patricia-tree
2022-03-02 11:50:35 +10:00
Lawrence Forman
901d400d62
Address spot check feedback (#251)
* UniswapV3 VIP (#237)

* `@0x/contracts-zero-ex`: Add UniswapV3Feature

* `@0x/contracts-zero-ex`: Add UniswapV3 VIP
`@0x/contract-artifacts`: Regenerate.
`@0x/contract-wrappers`: Regenerate.
`@0x/asset-swapper`: Add UniswapV3 VIP support.

* address review comments and appease linter

* `@0x/contracts-zero-ex`: Add UniswapV3Feature tests

* Multiplex UniswapV3 (#241)

* Add UniswapV3 support to Multiplex batchFill

* Add AssetSwapper support for Multiplex UniswapV3

* fix repo scripts that use PKG= env var (#242)

Co-authored-by: Lawrence Forman <me@merklejerk.com>

* `@0x/asset-swapper`: Adjust uniswap gas overhead

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>

* OTC orders feature (#244)

* Add OTC orders feature contracts

* Address PR feedback

* Remove partial fills for takerSigned variant

* Add function to query the min valid nonce

* Add ETH support

* Tightly pack expiry, nonceBucket, and nonce

* Address PR feedback

* OTC orders unit tests

* Bump prettier version

* Skip unnecessary math if takerTokenFillAmount == order.takerAmount

* appease CI

* Update contract-artifacts and contract-wrappers and CHANGELOGs

* `@0x/contracts-zero-ex`: Address spot check feedback

* `regen wrappers

* prettier

* `@0x/asset-swapper`: prettier and tweak gas schedule slightly for uni3

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2021-06-02 14:21:14 +10:00
mzhu25
d2f4a0c5f3 Updated config.yml 2021-05-10 19:51:12 -07:00
Jacob Evans
b0f5f634f2
bump test-publish resource_class 2021-05-05 21:02:31 +10:00
Lawrence Forman
a2d42b07b5
UniswapV3 [TKR-4] (#197)
* add balancer v2

* fetch balancer v2 pools from subgraph

* feat: initial stab at a Balancer V2 Sampler WIP

* feat: add sampling for buys and fix build issues WIP [untested]

* fix: BalancerV2Sampler implementation issues, works on Kovan

* chore: BalancerV2 sampling boilerplate

* fix: update Balancer V2 mainnet address

* fix: consolidate differences between the 2 working branches

* fix: use mainnet Balancer V2 subgraph

* fix: stack too deep by minimizing and inline Balancer V2 vault interface

* fix: address review comments and clean up

* fix: sampler vault interface and pools cache assuming a pool has swaps

* address more review comments

* fix: TS type issues and add a comment about deadline argument

* fix: pools_cache_tests incorrect token addresses, prettier incompat

* fix: make ERC20BridgeSampler support BalancerV2 non view sampler fns

* fix: use a struct for passing encoded bridge data for Balancer V2

* chore: add changelog entries

* fix: improve gas accuracy of gas schedule for Balancer V2 & Maker Psm

* fix: don't exclude sources with stale caches & wait for cache refresh

* rebase

* `@0x/asset-swapper`: Fix stack too deep errors in sampler

* `@0x/asset-swapper`: Add uniswap V3 sampler.

* `@0x/contracts-zero-ex`: Add UniswapV3 support to FQT

* `@0x/protocol-utils`: Update BridgeProtocols.
`@0x/asset-swapper`: Add sell integration for UniswapV3.

* `@0x/asset-swapper`: Remove unnecessary swap quote consumer constructor arg.
`@0x/asset-swapper`: Enable UniswapV3 on ropsten.

* `@0x/asset-swapper`: UniswapV3 fixes

* `@0x/asset-swapper`: Fix stuff based on latest deployed testnet contracts

* `@0x/asset-swapper`: Remove UniV3 from mainnet sources for now

* `@0x/asset-swapper`: Tweak univ3 gas schedule

* fix CI?

* `@0x/contracts-test-utils`: Set default ganache gas limit to 100e6

Co-authored-by: xianny <xianny@gmail.com>
Co-authored-by: Kim Persson <kimpersson88@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Jacob Evans <jacob@dekz.net>
2021-05-05 19:44:17 +10:00
Lawrence Forman
668aeb77f7 disable coverage ci job 2020-10-21 03:08:33 -04:00
Lawrence Forman
6106185bf6 disable testing inactive packages in ci 2020-10-21 02:11:04 -04:00
Lawrence Forman
6558632f10 remove bundlewatch from static-tests ci job 2020-10-21 01:18:41 -04:00
Lawrence Forman
fc5d759131 update typedoc-plugin-markdown deps
fix broken static-tests ci job
2020-10-21 00:54:56 -04:00
Lawrence Forman
0ce6243653 update @0x/tools deps
skip kyber bridge tests
ignore some contract packages in tests by default
update package deps
update README, CI, and GH configs
2020-10-20 20:53:39 -04:00
Jacob Evans
2f9b894d71
fix: bunny-hop small amounts (#2685)
* fix: bunny-hop small amounts

* fix lint and Dockerfile

* HACK: temporarily disable python
2020-08-27 10:49:14 +10:00
F. Eugene Aumson
1512afc7e6
CI: persist test-publish npm logs as Artifacts 2020-06-16 17:33:30 -04:00
Lawrence Forman
3a0d48ad77 Run broker tests on CI 2020-06-11 23:49:52 -04:00
Lawrence Forman
c0553fa9eb Add @0x/contracts-zero-ex project to monorepo.
Tweak circleci config to avoid running out of memory.
2020-04-21 22:29:46 -04:00
F. Eugene Aumson
16dc8255e1
Pin pytests to ganache snapshot 6.0.0 (#2535) 2020-04-06 20:01:54 -04:00
Lawrence Forman
3e8f9a6b53 Cherry-pick changes from feat/dev-utils/dydx-bridge-validation 2020-02-07 22:10:10 -05:00
Jacob Evans
a24b14c465
Pull 0xorg/ganache-cli:6.0.0 in circleci 2020-01-20 12:06:28 +10:00
F. Eugene Aumson
35d5d3d995
Pare down Mesh env vars in Py test env (#2418) 2019-12-21 13:19:00 -05:00
F. Eugene Aumson
4c21a697f4
sra_client.py: Tweak Mesh block polling interval used in tests (#2413)
* Change Mesh block polling interval to 50ms

* Increase Mesh's Ethereum node RPC rate limit
2019-12-20 11:26:57 -05:00
Greg Hysen
1afc09b08a Workaround for https://github.com/yarnpkg/yarn/issues/7773 2019-12-19 01:12:46 -08:00
F. Eugene Aumson
4f17a251d3
Python publish for v3 (#2383)
* Remove pre-release suffixes from version numbers

* For wrapper test, pull latest ganache image first

* For wrapper test, unpin ganache, use beta snapshot

* In docs, advise using beta ganache snapshot

Because we haven't yet published the non-beta snapshot

* Unpin package interdependencies

* unpin tests from beta 0xorg/ganache-cli version

* use beta ganache snapshot

* Set release date in CHANGELOGs

* In testing deployment, stop testing pre-releases

* Include rmtree("build") in all clean commands

* Fix clean not cleaning what it thought it was

* In monorepo script, install pkgs 1st then dev deps

* Stop pinning ganache snapshot version

* In test setup, wait longer for mesh to start up

* Fix broken hyperlinks in docs

* fix missing \n that was breaking doc rendering

* In monorepo script comment, fix typo, and clarify
2019-12-04 08:42:00 -08:00
Xianny
d73982819b
Deprecate abi-gen-wrappers (#2370)
* generate wrappers in @0x/contract-wrappers and delete abi-gen-wrappers

* trim exports from contract-wrappers

* separate contract-wrappers tests to get rid of dependency cycle

* remove dummy token contracts

* temporarily skip coordinator test until we can upgrade coordinator server
2019-11-27 17:50:24 -08:00
F. Eugene Aumson
42c4fe5705
Pre-release version bumps; test fixes for latest mesh/ganache versions (#2363)
* Use pre-release ver's for tests against deployment

* Pre-release version number bumps

* pin sra_client dev deps to prereleases

for testing against deployed package

* middlewares: incl doctest in tests of deployment

* Unpin mesh, use new snapshot, & pay protocol fees

* .gitignore gen'd wrappers for new contracts

* test build_tx() & support for empty TxParams.from_

* fix doc: fill TAKERAssetAmount, not maker...
2019-11-26 13:27:49 -05:00
Jacob Evans
4b5f2c36b9
Merge pull request #2336 from 0xProject/feature/upgrade-instant-v3
Upgrade instant v3
2019-11-26 20:43:58 +10:00
David Sun
88aac78282
removed asset-buyer from residual files 2019-11-26 11:33:04 +11:00
Lawrence Forman
5d1a7613dd Add @0x/contracts-erc20-bridge-sampler to CI 2019-11-25 17:48:53 -05:00
David Sun
15b75715ee enable tests 2019-11-25 15:14:02 -05:00
David Sun
de2b16c464 fixed migrations 2019-11-25 01:05:24 -05:00
F. Eugene Aumson
869d2c02fa
CI/test-python: give launch-kit-backend CHAIN_ID, not NETWORK_ID (#2327)
* CI/test-python: give LK ID of chain, not network

For CircleCI job test-python, change docker config for
launch-kit-backend to set an environment variable for the chain ID,
not for the network ID.  This was failing on all branches after a recent
update to the `0xorg/launch-kit-backend:v3` tag.

* Update docker config used for local testing

* Update documentation of test environment
2019-11-09 20:25:14 -05:00
F. Eugene Aumson
f51c80adb2
Change all instances of networkId to chainId (#2313)
* abi-gen/test: recompile contract fixtures for 3.0

It seems this hadn't been done since the merge with the 3.0 branch.

* Sync `monorepo$ yarn test` exclusions to CI config

* sra-spec: correct typo

* contract-wrappers: TODO after coord.-server update

* utils: fix typo in comment

* Refactor networkId to chainId everywhere

* Update CHANGELOGs
2019-11-06 01:18:55 -05:00
F. Eugene Aumson
e61f23d001
Migrate Python libraries to v3 (#2284)
* .gitignore migrations/0x_ganache_snapshot

* .gitignore new-ish Python contract wrappers

These should have been added back when we started generating these
wrappers.

* rm superfluous contract artifact in Python package

All of the contract artifacts were removed from the Python package
recently, because now they're copied from the monorepo/packages area as
an automated build step.  Somehow this one artifact slipped through the
cracks.

* Eliminate circular dependency

This was preventing the Exchange wrapper from ever importing its
validator!

* Improve output of monorepo-level parallel script

- Capture stderr (and have it included in stdout) so that it doesn't
leak onto the console for commands that didn't actually fail.

- Include all error output in the Exception object (eliminate print
statement).

* Silence new versions of linters

Newer versions care about this stuff.  Old versions didn't, and we don't
either.

* Support Rich Reverts via Web3.py middleware

* Fix bug in generated wrappers' bytes handling

`bytes.fromhex(bytes.decode('utf-8')` is just plain wrong.  It would
work for some cases, but is not working when trying to fill orders with
the latest Exchange contract.

* Migrate to Exchange v3

* Fix typo in DevUtils documentation

* Include new contracts in docs

* Re-enable Python checks in CI

* Accept strings for bytes

* Fix CircleCI build artifacts for gen'd python

I swear the previous way was working before, but it wasn't working now,
so this fixes it.

* Accept a provider OR a Web3 object

In various places.  This allows the caller to install middleware (which
in web3.py is installed on a Web3 object, not on a provider) before
executing any RPC calls, which is important for the case where one wants
to produce signatures locally before submitting to a remote node.

* wrapper base: don't assume there are accounts

* Eliminate some inline linter directives

* make CHANGELOGs be REVERSE chronological

* Update CHANGELOG entries and bump version numbers

* @0x/contract-addresses: Put addr's in JSON, not TS

This allows easier consumption by other languages.  (Specifically, it
eliminates the overhead of keeping the Python addresses package in sync
with the TypeScript one.)

* sra_client.py: incl. docker in `./setup.py clean`

* sra_client.py: Migrate to protocol v3

Removed script that existed only to exclude runs of sra_client builds
(parallel_without_sra_client).  Now `parallel` is used by CI,
re-including sra_client in CI checks.

* abi-gen/templates/Py: clarify if/else logic

In response to
https://github.com/0xProject/0x-monorepo/pull/2284#discussion_r342200906

* sra_client.py: Update CHANGELOG and bump version

* contract_addresses/setup.py: rm unnecessary rm

* json_schemas.py: corrections to dev dependencies

* In tests against deployment, also run doctests

* contract_wrappers example: rm xtra Order attribute

Thanks to @steveklebanoff for catching this.
https://github.com/0xProject/0x-monorepo/pull/2284#pullrequestreview-312065368
2019-11-05 23:04:29 -05:00
Alex Towle
f5a6b84fa3 CI: Added a seperate workflow for contracts/integrations 2019-10-22 12:07:50 -07:00
Alex Towle
718407ba6f @0x:contracts-integrations Switched to object destructuring in the function assertion unit test 2019-10-22 12:07:50 -07:00
Alex Towle
89ae04803f @0x:contract-integrations Added the integrations package to CI 2019-10-22 12:01:54 -07:00
Xianny
ce9f051d42
Create @0x/contracts-tests (#2261)
* Create @0x/contracts-tests

* Move tests from @0x/contracts-dev-utils
2019-10-21 10:23:46 -07:00
Michael Zhu
52fc7517f9 Remove approval expirations, address other comments 2019-10-06 12:45:48 -07:00
fabioberger
2d69afec86 Increase timeout on publish test 2019-10-02 21:32:18 +08:00
fabioberger
30417fbf24 Increase doc gen timeout 2019-10-02 20:51:41 +08:00
fabioberger
043534dd56 Add back publish and doc gen tests to CI 2019-10-02 14:29:13 +08:00
fabioberger
a90c808fb4 Remove Geth testing from CI 2019-10-02 14:28:27 +08:00
xianny
245c87f026 re-enable test-rest 2019-09-25 10:48:55 -07:00