30 Commits

Author SHA1 Message Date
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
Jacob Evans
7e8b56eef4
feat: mStable + FQT Rollup (#2662)
* feat: mStable

* deploy and CHANGELOG

* `@0x/contracts-utils`: Add more testnet addresses.

* `@0x/contract-addresses`: Deply Mstable on testnets

* `@0x/contract-addresses`: Remove testnet deployments of mStable :-)

* move `erc20-bridge-sampler` into `asset-swapper`
remove `DevUtils` dependency from sampler contract.

* `@0x/asset-swapper`: Add ERC20BridgeSampler support for validating orders in maker fees denominated in non-maker assets.
`@0x/asset-swapper`: Add tests for `NativeOrderSampler`.

* `@0x/asset-swapper`: Return `0` sample if native order asset data is unsupported.

* `@0x/asset-swapper`: Fix failing test.

* feat: ExchangeProxy FQT fruit rollup (#2645)

* feat: Optimize Bridges in ExchangeProxy

* compile and most work

* work around to trust the delecall contract

* force allowances

* Update Kyber/Eth2Dai bridges

* Remove memory state where not required

* cleanup

* Combine Bridges into one adapter

* mixins

* refactor out ZeroExBridge

* move out interface

* comment out hacks

* update migrations

* remove simbot hacks

* AdapterAddresses and mStable

* Share constructor arg

* fix migration

* Remove whitespace

* `@0x/contracts-zero-ex`: BridgeAdapter -- revert if bridge address is 0.

* `@0x/contract-addresses`: Deploy FQT.

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

* update ganache contract addresses

* fix: asset-swapper empty batch call (#2669)

* update ganache contract addresses

* fix: asset-swapper prevent empty sampler batch call

* add sampler to migrations

* change migrations version

* Use contract-wrappers and artifacts

* remove extra data

* remove deps, set sampler to NULL_ADDRESS

* all the exports

* noop sell rate too

* update ganache contract addresses

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-08-20 08:18:44 +10:00
Lawrence Forman
957ef5ab77 @0x/contract-artifacts: Add IZeroEx artifact. 2020-07-22 23:41:11 -04:00
Jacob Evans
762e0aec2d
fix: Update to use KNP getExpectedRateAfterFee (#2629)
* Update to use KNP getExpectedRateAfterFee

* hack: use overrides instead of forking in ganache

* fix: added some tests using overrides

* override sampler

* Overrides in bridge_sampler_mainnet_test

* use getContracts to fake out tests

* chore: supply devUtils address

* feat: specify the call override by default

* CHANGELOGs

* export SamplerOverrides

* fix package.json

* fix: after rebase
2020-07-15 14:05:57 +10:00
Lawrence Forman
3e3bc5c06d @0x/contract-artifacts: Add ITransformERC20 artifact.
`@0x/contract-wrappers`: Add `ITransformERC20Contract`.
2020-06-11 23:50:25 -04:00
Michael Zhu
8e5dd0f8d9 Add Broker and GodsUnchainedValidator to contract-artifacts 2020-02-10 17:08:24 -08:00
Lawrence Forman
4016808fa4 Cherry pick DevUtils refactor code from #2456 2020-02-07 23:23:23 -05:00
James Towle
ce04d3ce41 Fix regression in DevUtils (#2449)
* fix bug in OrderTransferSimulationUtils causing failures for 721 assets

* Patched the regression and added tests

* Added regression test for fillable order

* Created a test for in and out of process ganache

* Split up DevUtils into two contracts

* Updated migration

* Remove the in and out of process ganache test

* Fixed contract addresses

* Appease linter

* Addressed review comments and updated artifacts, wrappers, and snapshots

* Fixed regression after refactor

* Update DevUtils and libTransactionDecoder contracts on mainnet and testnets

* Addressed @mzhu's review feedback

* Addressed @hysz's review feedback

* Updated devUtils address on testnets and mainnet after deployment

Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Fabio B <kandinsky454@protonmail.ch>
2020-01-22 12:54:10 +10:00
Lawrence Forman
994908549d Asset-swapper aggregator utils (#2353)
* `@0x/asset-swapper`: Add ERC20Bridge aggregator library.

* `@0x/asset-swapper`: Finish off `aggregate.ts`.

* `@0x/types`: Add `OrderWithoutDomain` type.

* `@0x/asset-swapper`: Add testing infra for sampler/aggregator.

* `@0x/types`: Add `SignedOrderWithoutDomain` type.

* `@0x/asset-swapper`: Update aggregator to take and return orders with signatures.

* `@0x/asset-swapper`: Fix broken aggregator tests.

* `@0x/asset-swapper`: Pass the sampler contract into aggregator entry points.

* `@0x/contract-artifacts`: Add `IERC20BridgeSampler` artifact.

* `@0x/contract-wrappers`: Add `IERC20BridgeSampler` wrapper.

* `@0x/asset-swapper`: Address review comments.

* fixed testing

* refactored aggregate.ts and embeded into asset-swapper

* added adjusted rates for taker and maker fees

* remove PrunedSignedOrders

* updated contract-addresses and addressed some other todos

* streamlined logic

* patched in lawrences changes

* renamed aggregator utils and removed market_utils.ts

* added ack heartbeats

* fixed bug

* patches

* added dummy order things

* Dummy with valid sig

* Tweak gas price calculation to wei

* added test coverage and fixed bugs

* fixed migrations

* Fix CHANGELOGs and types export

* Deploy latest ERC20BridgeSampler on Mainnet

* `@0x/types` Revert CHANGELOG.

* `@0x/asset-swapper`: Address review comments.
`@0x/contract-addresses`: Make kyber lowercase.

* made protocol fee multiplier async

* `@0x/asset-swapper: Fix build errors and do some code cleanup.

* use assetDataUtils where possible
2019-12-16 12:35:58 -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
Jacob Evans
724085e068
Remove TestStaking
CHANGELOG updates
Rebase and clean imports
Fix lint
2019-11-15 12:34:41 +10:00
Jacob Evans
21fab3ef9f
Added Staking and ERC20 Bridge to migrations 2019-11-15 11:38:43 +10:00
fabioberger
c9d85cfc7d Remove EthBalanceChecker as standalone contract artifact/wrapper 2019-11-11 17:53:07 +00:00
Alex Towle
b4e00baa07 @0x:artifacts Added the Staking and StakingProxy artifacts 2019-10-31 10:18:40 -07:00
fabioberger
e43f2d39bf Add ERC1155Mintable to artifacts and abi-gen-wrappers packages 2019-10-17 12:16:08 +09:00
Xianny
2d77fce99d
Re-enable all TypeScript Packages on 3.0 (#2181)
* update with WIP artifacts and wrappers

* Update order-utils to get build:contracts working

* get asset-buyer and asset-swapper building with 3.0

* get testnet-faucets building on 3.0

* re-enable build for most packages
2019-09-23 15:52:51 -07:00
F. Eugene Aumson
bca8c5eccc
DevUtils.sol: Upgrade for v3 (#2161)
* Exhibit bug in getSimulatedOrderTransferResults

* Fix getSimulatedOrderTransferResults

* dev-utils/package.json: add quantify_bytecode cmd

* Fix typo in log message

* Reduce compiler optimization runs

In order to reduce the EVM bytecode object length of the DevUtils
contract to be under the EIP-170 limit of 24 KB.
2019-09-18 19:36:06 -04:00
Xianny
29d5db16c2
copy artifacts should not use python path anymore (#2070) 2019-08-15 09:50:11 -07:00
Jacob Evans
eb21718462
Added DevUtils Wrappers 2019-08-13 14:44:53 +10:00
Amir Bandeali
424f984ea8
Add ERC1155Proxy and StaticCallProxy artifacts 2019-08-06 09:45:39 +10:00
Xianny
a977957946
Require compiler field in published artifacts for v3 (#1961) 2019-07-16 12:25:08 -07:00
xianny
86333f4928 add devdocs to all artifacts 2019-06-27 22:00:41 -07:00
Xianny
bd228034fd
Add workflow for copying compiled artifacts to 0x/contract-artifacts (#1842)
The contract artifacts should remain as standard compiler output during development. Fields should only be removed/added prior to being published in `@0x/contract-artifacts`. This PR adds the `yarn transform` script to `@0x/contract-artifacts` to facilitate this. 

Going forward, `abi-gen-templates` will have to support both standard artifacts and modified artifacts if they diverge, since the templates are used for `contract-artifacts`/`abi-gen-wrappers` (modified artifact) *and* development in all the `contracts/*` packages (standard artifact).

This PR makes the following changes to `contract-artifacts`:
- remove `evm.bytecode.linkReferences` from all artifacts
- remove `evm.deployedBytecode` and `sourceTreeHashHex` from Coordinator artifact
- prettify all artifacts (whitespace only changes)
2019-06-17 11:00:53 -07:00
Fabio Berger
43afe67593 Add EthBalanceChecker contract to monorepo 2019-06-11 08:45:15 -07:00
Jacob Evans
9164d58dc7
Simulate maker transfer in order validation 2019-03-28 14:00:27 +01:00
Fabio Berger
5eedc1edca Add Coordinator contracts to contract-artifacts package 2019-03-11 14:38:00 +01:00
Jacob Evans
e3b3f82c8c
feature(migrations): Add MultiAssetProxy Migration 2019-01-12 18:49:16 +11:00
Greg Hysen
43b648e7dc Dutch wrapper 2019-01-07 15:50:48 -08:00
Alex Browne
8f0ceaf1d8 Create abi-gen-wrappers package 2018-10-15 13:36:59 -07:00
Alex Browne
1da3604351 Create contract-artifacts package (needed to solve dependency cycle) 2018-10-15 13:36:59 -07:00