2481 Commits

Author SHA1 Message Date
Lawrence Forman
ecfbd6280f @0x/contracts-zero-ex: Address review feedback. 2020-05-28 11:56:59 -04:00
Lawrence Forman
a7ce72cae0 @0x/contracts-zero-ex: Rebase against development 2020-05-28 11:56:59 -04:00
Lawrence Forman
28402ff7d8 @0x/contracts-zero-ex: Add self-destructing to transformers 2020-05-28 11:56:59 -04:00
Lawrence Forman
c610dd96f5 @0x/contracts-zero-ex: Rebase, returning nonces in transform(). 2020-05-28 11:56:59 -04:00
Lawrence Forman
2ba3818b65 @0x/contracts-zero-ex: Introduce transformer contracts. 2020-05-28 11:56:59 -04:00
Lawrence Forman
0e1a5a375a @0x/contracts-test-utils: Add msg param to assertIntegerRoughlyEquals 2020-05-28 11:56:59 -04:00
Lawrence Forman
6359f1950e @0x/contracts-zero-ex: Address review feedback. 2020-05-28 11:56:59 -04:00
Lawrence Forman
030cb285da @0x/contracts-zero-ex: Use immutable owner in Puppet instead of Ownable. 2020-05-28 11:56:59 -04:00
Lawrence Forman
af45409959 @0x/contracts-zero-ex: Revamp TransformERC20. 2020-05-28 11:56:59 -04:00
Lawrence Forman
d9a9bc35e3 @0x/zero-ex: Rebase and use "slot" instead of "offset" language in storage buckets. 2020-05-28 11:56:59 -04:00
Lawrence Forman
c911c3352c @0x/contracts-zero-ex: Make TokenSpender's puppet contract a distinct contract type and rename getTokenSpenderPuppet() to getAllowanceTarget() 2020-05-28 11:56:58 -04:00
Lawrence Forman
654abbac25 @0x/contracts-zero-ex: Introduce the TransformERC20 feature. 2020-05-28 11:56:58 -04:00
Lawrence Forman
1509da1215 @0x/contracts-utils: Convert more 0.6 contracts 2020-05-28 11:56:58 -04:00
Lawrence Forman
548c30d6a0
ZeroEx: Audit Fixes (#2586)
* `@0x/utils`: Remove unused revert error.

* `@0x/contracts-zero-ex`: Address audit feedback.
2020-05-26 20:57:55 -04:00
Lawrence Forman
2fce332ed7
ZeroEx: TransformERC20, TokenSpender (#2545)
* `@0x/contracts-utils`: Convert more 0.6 contracts

* `@0x/contracts-erc20`: Add solidity 0.6 contracts.

* `@0x/utils`: Add new `ZeroExRevertErrors` revert types

* `@0x/contracts-zero-ex`: Introduce the `TransformERC20` feature.

* `@0x/subproviders`: Update ganache-core.
`@0x/web3-wrapper`: Update ganache-core.

* `@0x/contracts-zero-ex`: Make `TokenSpender`'s puppet contract a distinct contract type and rename `getTokenSpenderPuppet()` to `getAllowanceTarget()`

* `@0x/zero-ex`: Rebase and use "slot" instead of "offset" language in storage buckets.

* `@0x/web3-wrapper`: Add `getAccountNonceAsync()` to `Web3Wrapper`

* `@0x/contracts-zero-ex`: Revamp TransformERC20.

* `@0x/contracts-zero-ex`: Remove `payable` from `IERC20Transformer.transform()` and disable hex capitalization linter rule because of prettier conflicts.

* `@0x/contracts-zero-ex`: Use `immutable` owner in `Puppet` instead of `Ownable`.

* `@x/utils`: Address review feedback.

* `@0x/contracts-zero-ex`: Address review feedback.

* `@0x/contracts-utils`: Address review feedback.

* `@0x/contracts-zero-ex`: Return deployment nonce in `transform()`.

* `@0x/contracts-zero-ex`: Finish returning deployment nonce in `transform()`.

* `@0x/contracts-zero-ex`: Fix doc-gen bug.

* `@0x/contracts-zero-ex`: Address review comments.

* `@0x/utils`: Add `NegativeTransformERC20OutputERror`

* `@0x/contracts-zero-ex`: Revert if the taker's output amount decreases.

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-05-20 22:47:21 -04:00
Lawrence Forman
b348084e2a
@0x/zero-ex: Always offset storage bucket ID by 1. (#2579)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-05-08 20:13:45 -04:00
Jacob Evans
fb0311e675
feat: ERC20BridgeSampler Unlock Kyber collisions (#2575)
* feat: ERC20BridgeSampler Unlock Kyber collisions

* Updated fallback strategy

* Address comments

* Eth2Dai hop sampler

* Update packages/asset-swapper/src/utils/market_operation_utils/index.ts

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

* Set DFB expiry to 2hr

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-05-07 07:56:03 +10:00
Lawrence Forman
69f7343be5 @0x/contracts-zero-ex: Lock the caller of InitialMigration.deploy() and actually self-destruct. 2020-04-29 14:26:55 -04:00
Lawrence Forman
f2e16dfb21 @0x/contracts-zero-ex: Switch rich revert style.
`@0x/contracts-zero-ex`: Merge `FixinOwnable` -> `FixinCommon`.
2020-04-29 13:01:19 -04:00
Lawrence Forman
f1de64dcaf @0x/contracts-zero-ex: Make Ownable feature conform to IOwnable. 2020-04-28 12:16:30 -04:00
Lawrence Forman
feb672c3cd @0x/contracts-utils: Make IOwnableV06 conform to IOwnable. 2020-04-28 12:16:11 -04:00
Lawrence Forman
4d8d944fe5 @0x/contracts-utils: Update package.json 2020-04-24 01:06:44 -04:00
Lawrence Forman
0042e42160 @0x/contracts-zero-ex: Merge Migrate into Ownable 2020-04-24 01:06:44 -04:00
Lawrence Forman
f7f0152573 @0x/contracts-zero-ex: Add Unused to StorageId enum 2020-04-22 16:06:49 -04:00
Lawrence Forman
7df6530f3a @0x/contracrts-zero-ex: Address more review comments. 2020-04-21 22:29:46 -04:00
Lawrence Forman
80787456fa @0x/contracts-zero-ex: Fix comments. 2020-04-21 22:29:46 -04:00
Lawrence Forman
4446ac1ca3 @0x/contracts-zero-ex: Use (scaled) enums for storage IDs 2020-04-21 22:29:46 -04:00
Lawrence Forman
220039ab00 @0x/contracts-zero-ex: Allow any call target to bootstrap(). 2020-04-21 22:29:46 -04:00
Lawrence Forman
12f2250ab5 @0x/contracts-zero-ex: bootstrap() is now a temporary feature, registered in the ZeroEx constructor.
`@0x/contracts-zero-ex`: `bootstrap()` de-registers itself and self-destructs once it's called.
`@0x/contracts-zero-ex`: `bootstrap()` now takes arbitrary call data, but the callee is fixed in an immutable.
`@0x/contracts-zero-ex`: `bootstrap()` caller is fixed in an immutable.
`@0x/contracts-zero-ex`: `bootstrap()` only calls a single target.
`@0x/contracts-zero-ex`: Renamed `BasicMigration` to `InitialMigration`.
`@0x/contracts-zero-ex`: `InitialMigration` is now the bootstrap target and multiplexes to the initial features.
`@0x/contracts-zero-ex`: Add `Migrate` feature and tests.
`@0x/contracts-zero-ex`: Re-organize contract locatins (remove `interfaces` folder).
2020-04-21 22:29:46 -04:00
Lawrence Forman
72908b02fe @0x/contracts-zero-ex: Address review feedback.
`@0x/contracts-zero-ex`: Add target implementation address to `rollback()`.
`@0x/contracts-zero-ex`: Add storage ID uniqueness test.
`@0x/contracts-zero-ex`: Add rollback history querying functions to `SimpleFunctionRegistry`.
2020-04-21 22:29:46 -04:00
Lawrence Forman
c11d661b39 @0x/contracts-zero-ex`: Create ZeroEx (proxy) contracts 2020-04-21 22:29:46 -04:00
Lawrence Forman
4212a08337 @0x/contracts-utils: Add solidity 0.6 contracts 2020-04-21 22:29:46 -04:00
Jacob Evans
a458e81f8d
ERC20BridgeSampler: Additional Buy support (#2551)
* ERC20BridgeSampler: Sample Curve Buy

* Fake Buy Kyber/PLP

* Deploy mainnet

* Add Kyber rates for buy tests

* CHANGELOGs

* Provide maxIterations and targetSlippage as options

* Cleanup ERC20BridgeSampler for re-use

* Redeploy Mainnet Kovan

* Feedback fixes

* Handle OOG/revert 0s

* Redeploy Mainnet refactor
2020-04-21 13:26:12 +10:00
Lawrence Forman
434af0ae64
@0x/contracts-asset-proxy: Update CHANGELOG 2020-04-07 13:38:35 -04:00
Jacob Evans
cdbcada49b Authorize sender adddress 2020-04-07 12:35:18 -04:00
Jacob Evans
282930cb9b Add GST support to DFB 2020-04-07 12:35:18 -04:00
Jacob Evans
424cbd4831
Forwarder Market sell specified amount or throw (#2521)
* Forwarder Market sell specified amount or throw

* Address feedback comments

* Break if we have only protocol fee remaining

* Lint

* Update deployed addresses

* Updated artifacts and wrappers

* [asset-swapper] Forwarder throws on market sell if amount not sold (#2534)
2020-03-31 16:25:34 +10:00
Lawrence Forman
350feed993
Merge pull request #2531 from 0xProject/feat/erc20-bridge-sampler/dev-utils-as-param
ERC20BridgeSampler: Pass in `DevUtils` address as a constructor arg
2020-03-30 18:02:33 -04:00
Lawrence Forman
a509af2875 @0x/contract-addresses: Add dexForwarderBridge address.
`@0x/migrations`: Add `dexForwarderBridge` address field.
2020-03-27 16:40:46 -04:00
Lawrence Forman
1f789bf396 @0x/contracts-asset-proxy: Add DexForwarderBridge.executeBridgeCall() test. 2020-03-27 16:39:57 -04:00
Lawrence Forman
0ccbc7d3d2 @0x/contracts-asset-proxy: Fix typos and remove BridgeTransferFromCallFailed event from DexForwarderBridge. 2020-03-27 16:39:57 -04:00
Lawrence Forman
f3c6f26f85 @0x/contracts-asset-proxy: Fix typo in DFB tests. 2020-03-27 16:39:57 -04:00
Lawrence Forman
338c358df2 @0x/contracts-asset-proxy: Address review comments. 2020-03-27 16:39:57 -04:00
Lawrence Forman
4bdaa48303 @0x/contracts-asset-proxy: Create DexForwarderBridge bridge contract. 2020-03-27 16:39:57 -04:00
Lawrence Forman
36267746da @0x/contracts-erc20-bridge-sampler: Cache DevUtils address in getOrderFillableTakerAssetAmounts. 2020-03-26 12:11:14 -04:00
Lawrence Forman
7775541eed @0x/contracts-integrations: Update ERC20BridgeSampler tests 2020-03-26 12:09:14 -04:00
Lawrence Forman
5029be4c83 @0x/contracts-erc20-bridge-sampler: Pass in DevUtils address as a constructor parameter 2020-03-26 11:58:25 -04:00
Jacob Evans
277dbacf68
Set GSTCollector address and deploy Curve (#2530)
* Set GSTCollector address and deploy Curve

* CHANGELOGs
2020-03-26 18:26:16 +10:00
Jacob Evans
568e9be07e
Gas Tokens in Bridges (#2523)
* Gas Tokens in Bridges

* Added freesGasTokensFromCollector.

To handle the case where GST2 is being traded and the balanceOf checks become confusing

* Update CHANGELOGs
2020-03-26 11:58:28 +10:00
Lawrence Forman
ce96e35d7d @0x/contracts-asset-proxy: Rename ERC20BridgeTransfer event args to be less ambiguous. 2020-03-13 21:00:35 -04:00