Commit Graph

103 Commits

Author SHA1 Message Date
Lawrence Forman
71731d223b Update contract wrappers (esp Forwarder + asset-swapper) (#2432)
* `@0x/contract-artifacts`: Update artifacts.

* `@0x/contract-wrappers`: Regenerate wrappers.

* `@0x/migrations`: Update Forwarder migration.

* `@0x/asset-swapper`: Update forwarder fees for new forwarder contract.

* `@0x/dev-utils`: Make `"istanbul"` the default `hardfork` when creating a ganache provider.

* `@0x/asset-swapper`: Remove debug code.

* `@0x/asset-swapper`: Remove `getSmartContractParamsOrThrowAsync()` because why does it even exist?
`@0x/asset-swapper`: Fix broken tests.
`@0x/asset-swapper`: Correctly handle affiliate fees in `getCalldataOrThrow()`.

* `@0x/contract-wrappers`: Export `ExchangeOwnershipTransferredEventArgs`.
`@0x/0x.js`: Export `ExchangeOwnershipTransferredEventArgs`.
`@0x/asset-swapper`: Unexport `MethodAbi`, `ConstructorStateMutability`, and `StateMutability`.

* Update changelogs

* Update packages/migrations/CHANGELOG.json

Co-Authored-By: Jacob Evans <jacob@dekz.net>

* Update packages/asset-swapper/CHANGELOG.json

Co-Authored-By: Jacob Evans <jacob@dekz.net>

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Jacob Evans <dekz@dekz.net>
2020-01-09 15:35:22 -05:00
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
fabioberger
117f4a282d Add EnvVars type 2019-11-18 10:29:25 +00:00
fabioberger
e1ea65525f Add doc generation to several more packages and fix up their index.ts files so all public interface types are exported 2019-11-18 10:29:25 +00:00
fabioberger
d5c0f5aa47 Move chai extension types out of @0x/typescript-typings 2019-10-03 10:37:09 +08:00
Lawrence Forman
aa4ee2c166 @0x/dev-utils: Increase gas limit to 9e6 2019-09-22 13:08:59 -04:00
Lawrence Forman
2e357ffeab @0x/dev-utils: Add total_accounts option to Web3Config. 2019-09-04 20:18:55 -04:00
Alex Towle
7f17033ce3 @0x:contracts-exchange Added protocol fees to fillOrders and matchOrders 2019-08-28 15:05:13 -07: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
Alex Towle
22c8a25a26 Merge branch 'development' into 3.0 2019-08-19 11:13:21 -07:00
Xianny
8ce390be3c switch @0x/contract-wrappers to generated wrappers (#2037)
* switch @0x/contract-wrappers to generated wrappers

- remove TransactionEncoder
- move TokenUtils to @0x/dev-utils
- detailed changes in #2040
2019-08-08 07:29:30 -07:00
Lawrence Forman
ad25942731 @0x/dev-utils: Appease the linter gods. 2019-08-06 15:31:30 -04:00
Lawrence Forman
264b1d69d9 @0x/dev-utils: revertWith mocha extensions now accept Promise-like objects instead of just Promises. 2019-08-06 15:30:59 -04:00
Lawrence Forman
882dd4597e @0x/dev-utils: Move Error -> RevertError coercion logic to @0x/utils. 2019-07-23 15:27:39 -07:00
Lawrence Forman
2e846159a8 In @0x/dev-utils: swap order of equality check in RevertError chai helper from actual.equals(expected) to expected.equals(actual). 2019-07-23 15:17:56 -07:00
Lawrence Forman
94a91ed5c8 In @0x/dev-utils: Tweak equality assertion failure actual and expected rendering to be more readable 2019-07-23 15:17:56 -07:00
Lawrence Forman
162a812189 In @0x/typescript-typings: Add types for @0x/dev-utils chai helpers in types/@0x.
In `@0x/dev-utils`: remove global typescript types for chai helpers in lieu of defining them in `@0x/typescript-typings`
2019-07-23 15:17:56 -07:00
Lawrence Forman
1aae68c614 In @0x/dev-utils: Break out RevertError helper code into a separate file from chai_setup.ts.
In `@0x/dev-utils`: Add chai support for ganache and geth transaction reverts.
2019-07-23 15:17:28 -07:00
Lawrence Forman
e00ac37cb2 In @0x/dev-utils fix the RevertError chai helper's equal override not passing all arguments to previous handler.
In `@0x/dev-utils` add more `RevertError` chai helper tests for backwards compatibility with `rejectedWith`.
In `@0x/dev-utils` instead of overriding `rejectedWith`, add a new method `revertWith`.
In `@0x/dev-utils` clean up the code for the `RevertError` chai helper.
2019-07-23 15:16:49 -07:00
Lawrence Forman
42963ea77d Use new RevertError nomenclature.
Tweak `RevertError` coercion in chai helper.
Add more `RevertError` chai helper tests.
2019-07-23 15:15:17 -07:00
Lawrence Forman
ed78bde359 Make the chai helper for rich reverts in dev-utils more robust.
Add rich reverts chai helper tests to `dev-utils`
2019-07-23 15:14:52 -07:00
Lawrence Forman
9319f362bb Add chaiSetup function wtih rich revert support to @0x/dev-utils 2019-07-23 15:12:33 -07: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
f4a2e227e1 Remove all in-package monorepo-scripts by adding doc gen/upload and aggregate release note publishing to publish script 2018-07-29 21:58:39 +02:00
Leonid Logvinov
f3241ff86a Merge pull request #883 from 0xProject/feature/tslint-improvements
New tslint rules
2018-07-18 14:54:47 +02:00
Alex Browne
2bfacbb8ba Mine a dummy block in blockchain_lifecycle to re-apply any time offset 2018-07-17 11:48:39 -07:00
Leonid Logvinov
bf8ac3b9e6 Fix tslint issues 2018-07-17 12:59:02 +02: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
8adc6f0faa merge v2-prototype 2018-07-04 16:35:49 +02:00
Fabio Berger
5f2c303bd8 Remove hack since latest web3-provider-engine fixed underlying issue 2018-07-04 00:23:40 +02:00
Alex Browne
dc956020ef Move NodeType caching out of web3-wrapper and into our internal code 2018-07-03 12:57:11 -07:00
Alex Browne
5b64b3ea93 Improve robustness of revert reason assertions 2018-07-02 18:57:33 -07:00
Alex Browne
d79994fbb2 Improve reliability of the minimum block number hack for the devnet/geth 2018-06-28 15:32:14 -07:00
Alex Browne
7ab921669b Introduce subprovider for printing revert stack traces 2018-06-14 13:58:54 -07:00
Fabio Berger
e1879ef4d9 Fix no-unused-variable tslint rule to include parameters and fix issues 2018-06-11 23:42:30 +02:00
Leonid Logvinov
760bab8f86 Implement SolidityProfiler & adapt sol-cov to work with Geth 2018-06-08 14:56:45 -07:00
fragosti
e75721016e Fix linting issues 2018-06-06 16:43:05 -07: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
d6d7f4e875 Update more things to work with both Geth and Ganache 2018-06-06 12:40:31 -07:00
Alex Browne
45a3d8b75a Remove extra logs and other small fixes 2018-06-06 12:40:31 -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