Commit Graph

38 Commits

Author SHA1 Message Date
Amir Bandeali
0f151db355 Enable istanbul in Ganache 2020-01-06 22:12:05 -08:00
Lawrence Forman
ff2cc8c887 Add aggregator mainnet tests (#2407)
* `@0x/contracts-erc20-bridge-sampler`: Add gas limits to external quote calls.
`@0x/contract-addresses`: Point `erc20BridgeSampler` to new version.

* `@0x/contracts-utils`: Add kovan addresses to `DeploymentConstants`.
`@0x/contract-addresses`: Add kovan `ERC20BridgeSampler` address.

* `@0x/contracts-erc20-bridge-sampler`: Fix changelog.

* `@0x/asset-swapper`: Ignore zero sample results from the sampler contract.
`@0x/asset-swapper`: Allow skipping Uniswap when dealing with low precision amounts with `minUniswapDecimals` option.
`@0x/asset-swapper`: Increase default `runLimit` from `1024` to `4096`.
`@0x/asset-swapper`: Increase default `numSamples` from `8` to `10`
`@0x/asset-swapper`: Fix ordering of optimized orders.
`@0x/asset-swapper`: Fix best and worst quotes being reversed sometimes.
`@0x/asset-swapper`: Fix rounding of quoted asset amounts.

* `@0x/asset-swapper`: Change default `minUniswapDecimals` option from 8 to 7.

* `@0x/asset-swapper`: Revert uniswap decimals fix.

* `@0x/contracts-test-utils`: Add `blockchainTests.live()` for live network tests.
`@0x/contracts-test-utils`: Add modifiers to `blockchainTests.fork()`.
`@0x/contracts-integrations`: Add aggregator mainnet tests.

* `@0x/contracts-integrations`: Fix `fork/resets` modifier ordering on dydx tests.
`@0x/contracts-integrations`: Move and tweak aggregation tests.

* `@0x/contracts-integrations`: Handle non-responsive third-party SRA ordebooks with a little more grace.

* `@0x/contracts-integrations`: Fix linter error.

* `@0x/contracts-test-utils`: Consolidate fork provider logic into `mocha_blockchain.ts`.

* `@0x/contracts-integrations`: Run prettier on aggregation fill tests.

* `@0x/dev-utils`: Add `locked` to `Web3Config`.

* `@0x/contracts-integrations`: Update mainnet fork tests.
`@0x/contracts-test-utils`: Fix forked tests being skipped.
`@0x/contracts-erc20-bridge-sampler`: Regenerate artifacts.

* `@0x/contracts-test-utils`: Remove unecessary `locked` option when creating forked ganache provider.

* Fix redundant zero check

* Set fee amount in fillable amounts test

Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-01-03 23:47:40 -05:00
Amir Bandeali
cb5384c2fb Use fork configs if FORK_RPC_URL env var is set 2019-12-09 16:14:41 -08:00
Lawrence Forman
2e357ffeab @0x/dev-utils: Add total_accounts option to Web3Config. 2019-09-04 20:18:55 -04:00
Lawrence Forman
0c53e2fe46 @0x/dev-utils: Make ganache's allowUnlimitedCOntractSize option configurable via Web3Config.
`@0x/dev-utils`: Add `UnlimitedContractSize` to `EnvVars`.
2019-08-21 10:59:34 -04:00
Lawrence Forman
740913fa20 @0x/dev-utils: Set allowUnlimitedContractSize option when creating a ganache provider. 2019-08-21 10:59:34 -04:00
Xianny
7423028fea Replace lodash with built-ins where possible to reduce bundle size (#1766)
* add tslint rule to disallow lodash.isUndefined

* add tslint rule to disallow lodash.isNull

* apply fixes
2019-04-10 09:36:32 -07:00
Jacob Evans
180c65cfeb Change all packages to use web3providerengine without excess polling 2019-03-21 11:50:19 +01:00
Fabio Berger
d01837f42c Allow using Web3Factory in-process Ganache with existing snapshot 2019-02-08 13:19:47 +00:00
Jacob Evans
2a577e0475 Add Docker image and Snapshot commands 2018-12-17 15:44:24 +11:00
Jacob Evans
9f924e459c chore: change package org from 0xproject to 0x 2018-10-18 22:27:31 +11:00
Jacob Evans
21f6072186 Handle revert with reason when decoding call result
We use in-process ganache which throws on an RPC error. This means all of our tests get a nice revert error thrown when testing against ganache. This is not possible with RPC providers and a revert with reason result is returned. Our callAsync doesn't handle this and attempts to decode the revert with reason error log as a successful log, which results in an error while decoding.

This only works with our fork of ethers https://github.com/ethers-io/ethers.js/pull/188 and will need to be re-worked when updating to Ethers.js 4
2018-09-28 09:59:58 +10:00
Fabio Berger
512502ca08 Export Web3ProviderEngine from subproviders package 2018-07-13 14:26:02 +02:00
Fabio Berger
2e5ff53d72 -fetch'; 2018-07-13 12:42:01 +02:00
Fabio Berger
5f2c303bd8 Remove hack since latest web3-provider-engine fixed underlying issue 2018-07-04 00:23:40 +02:00
fragosti
e0d5b9daf8 Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/improve-linting 2018-06-06 16:36:11 -07:00
Alex Browne
2004c0d739 Add ability to quickly switch between Geth and Ganache by changing a const 2018-06-06 12:39:44 -07:00
Alex Browne
577156fe5f Use Geth for contract tests 2018-06-06 12:39:39 -07:00
fragosti
9778695b4a Try enabling no-unused-variable... 2018-06-04 19:48:21 -07:00
Leonid Logvinov
a7fc9caacb Introduce ethereum-types package 2018-05-31 11:04:05 -07:00
Amir Bandeali
8f2fd9b603 Rename Signer to Wallet, rename GAS_ESTIMATE to GAS_LIMIT 2018-05-30 17:11:31 -07:00
Amir Bandeali
18ebed3c5d Increase block gas limit 2018-05-30 17:11:30 -07:00
Leonid Logvinov
1ff34bd0f4 Remove web3Factory.create and remove dev-tools dependency on sol-cov 2018-05-22 15:20:34 -07:00
Leonid Logvinov
c093aab350 Fix ganache subprovider config 2018-05-11 11:59:08 +02:00
Jacob Evans
7b318b3cc2 Update the Changelog with pr number 2018-04-14 13:15:22 +10:00
Jacob Evans
73e23996a6 Remove truffle-hdwallet from 0x.js tests 2018-04-13 13:16:30 +10:00
Leonid Logvinov
249bf0163d Move our contract templates to accept Provider instead of Web3Wrapper 2018-04-04 11:56:32 +03:00
Leonid Logvinov
a9db0e8ebe Properly and consistently parse ENV vars 2018-03-13 15:19:31 +01:00
Leonid Logvinov
d6c2e47bbd Make env variables parsing more strict and add docs 2018-03-12 03:37:30 +01:00
Leonid Logvinov
981752059c Add double negation before using shouldUseInProcessGanache 2018-03-12 03:37:29 +01:00
Leonid Logvinov
6c87ebac01 Rename useInProcessGanache to shouldUseInProcessGanache 2018-03-12 03:37:28 +01:00
Leonid Logvinov
a9479b3c01 Make coverage a module instead of a function 2018-03-12 03:37:28 +01:00
Leonid Logvinov
c5afca53a4 Rename COVERAGE to SOLIDITY_COVERAGS 2018-03-12 03:37:28 +01:00
Leonid Logvinov
3b77e4ebf1 Rename getCoverageSubprovider to getCoverageSubproviderSingleton 2018-03-12 03:37:28 +01:00
Leonid Logvinov
13299158d1 Add sol-cover implementation 2018-03-12 03:37:27 +01:00
Leonid Logvinov
bbfbfcda85 Change imports order 2018-02-14 15:03:52 -08:00
Leonid Logvinov
dbad7d1869 Move subproviders from dev-utils to subproviders 2018-02-14 11:51:26 -08:00
Leonid Logvinov
709026bf1a Refactor contracts tests to not use injected web3 instance 2018-01-30 16:01:36 +01:00