847 Commits

Author SHA1 Message Date
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
fe935f787c
Use @0x/fast-abi instead of deprecated fast-abi (#540) 2022-08-08 14:34:48 +09:00
Kyu
1d49662c58
Upgrade fast-abi (#538) 2022-08-08 11:27:44 +09:00
Github Actions
fe73b63aaa Updated CHANGELOGS & MD docs 2022-08-06 01:52:55 +00:00
Kyu
98fc79a085
Upgrade dependencies in asset-swapper to match the versions used in 0x-api [TKR-484] (#535)
* Upgrade dependencies to match the versions used in 0x-api

* Fix/disable tslint issues from the new version
2022-08-05 14:26:18 +09:00
Github Actions
980d60deb8 Updated CHANGELOGS & MD docs 2022-08-01 22:10:42 +00:00
Kyu
d6d79e51e7
Use 0x gas api instead of eth gas station api [TKR-502] (#532)
* Use 0x gas api instead of eth gas station api

* Add integration test for `ProtocolFeeUtils`

* Update CHANGELOG.json
2022-08-01 14:42:45 -07:00
Kyu
d03d2f254d
Remove unused dependencies in asset-swapper [TKR-484] (#521)
* Remove unused dependencies

* Remove unused devDependencies
2022-07-19 16:44:40 -07: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
Github Actions
1cd10f0ac9 Updated CHANGELOGS & MD docs 2022-05-19 03:39:57 +00:00
Jacob Evans
68f87b2432
fix: BalancerV2 sor alias (#481)
* Install both Balancer sor and rename early version to v1

* yarn.lock

* CHANGELOG
2022-05-19 13:19:25 +10:00
Github Actions
c18149e82f Updated CHANGELOGS & MD docs 2022-05-02 21:22:33 +00: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
c9c30d3a76
chore: bump ts version to solve type issue with ethereumjs (#455) 2022-03-31 13:55:17 +02:00
Lawrence Forman
904214f4a8
ugprade tools deps and regenerate wrappers (#449)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2022-03-16 12:14:31 -04:00
Noah Khamliche
29fa408256 final nitpicks 2022-03-10 21:22:28 -05:00
Kim Persson
4cd767ecb8
feat: VIP routing in the router, don't create fallback orders for native [TKR-243] (#440)
* feat: calculate all routes and VIP only routes in a single router call

* fix: Try to disable using fallback orders for quotes with native orders

* fix: create VIP sources set once per routing call

* chore: use private publish version of neon-router to test

* chore(lint): comment out unused fn _addOptionalFallbackAsync

* chore: update to latest private publish of neon-router

* refactor: fix router metrics beforeTimeMs naming

* feat: don't recompute isVip for ever sample of a source

* chore: update neon-router to real published version

* fix: merge conflict resolution issue

* chore: add asset-swapper changelog entry
2022-03-09 15:39:47 +01:00
Cece Z
ae2fe55efa
[TKR-275] Add Geist on Fantom (#398)
* Add Geist on Fantom

* nvm there is not subgraph for it

* finish giest utils

* Address pr comments

* lowercase gtoken addresses

* return undefined instead of error for unsupported pairs

* another lower case

* Update fantom fillQuoteTransformer address

* more const clean up
2022-03-02 01:34:30 -05: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
Kim Persson
6480aaa189
fix: native order scaling & don't try to route 1 wei trades (it will fail) (#430)
* feat: scale oversized native orders to quote amount for fake samples

* chore: temporarily use private publish neon-router version

* fix: short circuit 1 base unit trades to avoid router error

* chore: use published version of `neon-router`

* chore: add changelog entry for asset-swapper
2022-02-24 10:34:17 +01:00
Github Actions
1847ab93af Updated CHANGELOGS & MD docs 2022-02-22 22:32:20 +00:00
mzhu25
c1177416f5
[Final] ERC721 and ERC1155 Orders (#429)
* add LibERC721Order.sol

* Add ERC721 interface to vendor/

* Add ERC721OrdersFeature interface

* Storage lib for ERC721 orders feature

* Implement basic functionality for ERC721 orders (buy, sell, cancel, etc)

* Add isValidERC721OrderSignature to interface

* implement onERC721Received

* Implement batchBuyERC721s

* left/right orders -> sell/buy orders

* Add missing @return comments

* Implement matching functions

* Use SafeMath where necessary

* add rich errors for ERC721OrdersFeature

* Add comments

* Add presign support for ERC721 orders

* Cancel using just the order nonce

* Add IERC721OrdersFeature to IZeroEx

* Add taker callback

* Assembly optimizations in LibERC721Order

* Add ERC721Orders TS class

* create zero-ex/contracts/test/integration/ and tokens/ directories

* TestMintableERC721Token

* tmp

* address feedback from original PR (#391)

* address feedback from original PR

* Update contracts/zero-ex/contracts/src/features/ERC721OrdersFeature.sol

Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>

* address review feedback and improve order parameter naming

* Add batchCancel function

* Emit order fields in preSign

* Fix tests

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>

* Remove revertIfIncomplete from batchMatch

* Sanity check maker address in preSign

* ERC1155OrdersFeature contracts

* Commence refactor, abstract base contract

* ERC721OrdersFeature inherits from NFTOrders

* Refactor ERC1155OrdersFeature to inherit from NFTOrders

* Fix order hashing

* Fix ERC721OrdersFeature tests

* Typos

* Remove maker address from preSigned mapping

* disable dex sampler tests

* Refactor TS tooling

* Address PR feedback

* Rearrange event fields to better align with struct fields

* Update comments

* update AbiEncoder.create params

* Add ERC1155Order to protocol-utils

* Add ERC1155OrdersFeeature tests

* Bump package versions and regenerate contract wrappers

* Add ERC165Feature

* NFT orders: address audit findings (#417)

* CVF-1: use pragma solidity ^0.6 instead of ^0.6.5

* CVF-11: fix inaccurate comment

* CVF-16: Enable taker callbacks for batchBuyERC1155s

* CVF-17: use internal call if revertIfIncomplete is true

* CVF-21: avoid duplicate SLOAD

* CVF-23: merge if statements

* CVF-24: Reorder status checks to be consistent with ERC721OrdersFeature

* CVF-25: Update unclear comment (canonical hash -> EIP-712 hash)

* CVF-31: Document keys of orderState mapping

* CVF-45: DRY up fees/properties hashing

* CVF-47, CVF-50, CVF-57: calculate properties.length once; hash propertyStructHashArray in-place using assembly

* CVF-56: More descriptive names for assembly variables

* CVF-71: Update confusing comment about rounding in _payFees

* CVF-72: Move ETH assertions outside of loop in _payFees

* CVF-74: Move property validation loop to else branch

* CVF-82: Update inaccurate comment

* CVF-86: Enable taker callbacks for batchBuyERC721s

* CVF-87: use internal call if revertIfIncomplete is true

* CVF-89: Perform token mismatch checks before stateful operations

* CVF-90, CVF-91: Defer ERC20 token mismatch check

* CVF-93: Add inline comments for _payFees parameters in matchERC721Orders

* CVF-94: Fix comment (Step 7 -> Step 5)

* CVF-98: Use binary & operator instead of mod

* CVF-99: Update unclear comment (canonical hash -> EIP-712 hash)

* CVF-65, CVF-66, CVF-67: Copy params.ethAvailable into local variable; check that ethSpent does not exceed ethAvailable; remove ethAvailable < erc20FillAmount check

* CVF-52, CVF-55, CVF-59: calculate fees.length once; hash feeStructHashArray in-place using assembly

* CVF-14, CVF-32: OrderState struct; separate storage mapping for 1155 cancellations so orders can be cancelled by nonce

* Update changelogs, IZeroEx artifact/wrapper

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2022-02-22 10:00:22 -08:00
Kim Persson
eb12eac5f3
fix: start native orders "samples" at 0 & don't skip neg adj orders (#425)
* fix: start native orders "samples" at 0 & don't skip neg adj orders

* fix: bail on routes with invalid output estimation (no valid route)

* chore: bump neon-router version

* chore: add asset-swapper changelog entry
2022-02-22 13:31:47 +01:00
Kim Persson
25dd6bc79a
fix: incorrect output scaling when input is less than desired amount (#401)
* fix: incorrect output scaling when input is less than desired amount

* chore: bump fast-abi

* chore: add changelog entry for asset-swapper
2022-02-10 10:43:44 +01:00
Kim Persson
285f98e9e9
feat: Udate neon-router and use router estimated output amount (#354)
* feat: use Rust router estimated output amount when possible

* fix: use strings for sample ids, and increase samples in the rust router

* fix: remove unnecessary interpolation of out of range values

* fix: don't recalculate sampled dist sum in a loop

* fix: use 14 samples for rust router to work around interpolation issues

* fix: unintentional logic change

* fix: remove local dev plotting param from route fn call

* feat: make neon-router number of samples configurable

* chore: bump to newly published neon-router version

* fix: handle insufficient liquidity at all requested sources

* chore: update asset-swapper changelog
2021-12-29 12:08:24 +01:00
Jorge Pérez
b7adc5a889
feat: Extended Quote Report
* Extended Quote report for indicative quote

* feat: Only save 'full' quotes on quote report

* Unify extended quote report
2021-11-09 13:05:01 -06:00
Kim Persson
a6d690f10a
chore: update to new router version and address breaking changes (#344)
* chore: update to new router version and address breaking changes

* chore: add changelog entry
2021-10-18 11:15:31 +01:00
Kim Persson
d06daf2957
feat: initial integration of new router (#295)
* feat: integrate Rust router with asset-swapper WIP

* fix: produce outputFees in the format the Rust router expects

* fix: correct output fee calc and only use the rust router for sells

* fix: make sure numbers sent to the rust router are integers

* hack: try to debug why rust router output is being overestimated WIP

* refactor: clean up router debugging code

* fix: don't use negative output fees for sells

* feat: try VIP sources in isolation and compare with routing all sources

* fix: adjust for FQT overhead when choosing between VIP, all sources WIP

* fix: pass gasPrice to path_optimizer for EP overhead calculations

* feat: buy support with the Rust Router WIP

* chore: WIP commit trying to get buys working

* refactor: use samples instead of fills for the Rust router

* feat: add vip handling hack to sample based routing

* fix: revert to 200 samplings for rust router when using pure samples

* refactor: remove old hacky Path based Rust code, add back feature toggle

* fix: scale both fill output and adjustedOutput my same factor as input

* feat: initial plumbing for supporting RFQ/Limit orders

* fix: incorrect bump of input amount by one base unit before routing

* fix: add fake samples for rfq/limit orders to fulfill the 3 sample req

* fix pass rfq orders in the correct format to the rust router

* chore: remove debugging logs and clean up code & comments

* fix: use published version of @0x/neon-router

* hack: scale routed amounts to account for precision loss of number/f64

* refactor: clean up code and address initial review comments

* fix: only remove trailing 0 output samples before passing to the router

* refactor: consolidate eth to output token calc into ethToOutputAmount fn

* fix: interpolate input between samples on output amount instead of price

* fix: return no path when we have no samples, add sanity asserts

* refactor: fix interpolation comment wording

* fix: remove double adjusted source route input amount

* chore: update changelog for asset-swapper
2021-10-04 12:09:54 +02:00
mzhu25
1849b1bb9a
Update ExchangeProxySwapQuoteConsumer for MultiplexV2 (#282)
* Update ExchangeProxySwapQuoteConsumer for MultiplexV2

* Move TransformERC20FeatureContract instance into private readonly
2021-09-29 16:02:13 -07:00
Lawrence Forman
23f6e9e53c
fix mixed @0x deps (#328)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-09-15 00:01:15 -04:00
Github Actions
1bf96e91bb Updated CHANGELOGS & MD docs 2021-08-31 07:06:27 +00:00
Romain Butteaud
eb733cc58f
add: Curve new pools (CVX-CRX, MIM, atricrypto3) (#315)
* add: Curve new pools (CVX-CRX, MIM, atricrypto3)

* prettier

* fix: AS CHANGELOG

* fix: update monorepo-scripts
2021-08-30 23:45:47 -07:00
Jacob Evans
9727f0cebe
feat: Enable partial Native order fills. Union intermediary tokens (#309)
* feat: Enable partial Native order fills

* change intermediary tokens to be a UNION.

Hint to cvxCRV and CRV

* Pin asset-swapper to use contracts-zero-ex 0.27.0 for now

* feat: Retire Eth2Dai/Oasis
2021-08-19 15:21:23 +10:00
Jacob Evans
68656b4a4d
chore: Prune old contracts (#304)
Prune exchange-libs
deploy migrations at specific address
remove exchange-libs, moving LibMath into Utils
Remove staking order-utils multisig and remaining asset-proxy
2021-08-18 10:33:47 +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
Daniel Pyrathon
df055e1958
fix: Added fee parameter to Quote Requestor (#235)
* Added changes

* Fixes

* Applied PR feedback

* lint fix
2021-05-11 12:57:51 -04:00
Github Actions
fdf04ef275 Updated CHANGELOGS & MD docs 2021-05-05 11:32:46 +00: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
Xianny
f9a794af93
feat: Balancer V2 integration (#206)
* 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

Co-authored-by: Kim Persson <kimpersson88@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-05-05 11:01:28 +02:00
Jacob Evans
cd296b8767
feat: Prune Paths + Fast ABI (#183)
* Cull paths which cannot improve price

* fixes and rename

* optimizations

* disable ABI optimization for sampler

* fix lint

* use fastabi

* Update to fastabi 0.0.2

* update packages

* Fix NaN case

* update to published packages

* rebased

* Update generated wrappers
2021-04-28 17:16:24 +10:00
Lawrence Forman
5946d32a7d
Berlin wrappers (#212)
* `@0x/contract-wrappers`: Regenerate wrappers using updated abi-gen
Update tools deps

* update deps to hopefully fix doc gen
2021-04-27 12:16:08 -04:00
Kim Persson
3adfcdffa8
Maker PSM integration [TKR-2] (#150)
* ADDS basic boilerplate for PSM bridge WIP

* ADDS integrate the MakerPSM mixin and fix incorrect naming

* fix: take into account PSM fee when buying USDC from PSM

* feat: intial stab at a PSM sampler WIP

* feat: integrate MakerPsm into AS WIP

* refactor: get VAT contract address from PSM instead of passing it in

* fix: hardcode PSM Gemtoken to USDC

* fix: remove passing in authGem, get from PSM contract instead

* fix: use constant modified to avoid using storage variables

* fix: incorrect num decimals after multiplication in sampler

* fix: PSM buy sampling

* fix: use fillData to estimate gas schedule

* Rebased on latest development

* Guard and use latest Curve LiquidityProvider

* `@0x/contract-addresses`: Redeploy FQT on mainnet and ropsten

Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2021-04-01 15:45:06 -04:00
phil-ociraptor
70ddab0231
[MKR-3] Prepare Asset Swapper for RFQM (#187)
* Prepare QuoteRequestor for RFQM

* Add unit tests for Quote Requestor changes

* Fix lint errors
2021-03-31 12:11:10 -05:00
Xianny
7bf009fbf6
Upgrade to typescript v4.2.2 (#188)
* upgrade to typescript v4.2.2

* prettier; remove outdated test
2021-03-30 13:26:05 -07:00
Oskar Paolini
f3ca4293bc
feat: add proxy configuration to axios instance in RFQT asset-swapper (#159)
* add proxy configuration to axios instance

* add support for additional axios instance opts

* move quoteRequestorHttpClient parameter

* fix tests, build errors

* prettier

* bump axios

* bumped mock-axios-adapter version

* downgrade axios again

* re-upgrade axios 🤦

* updated yarn.lock

* updated changelog

Co-authored-by: Alex Kroeger <alexrkroeger@gmail.com>
2021-03-03 11:38:54 -08:00
Lawrence Forman
db3e076d03 update deps and publish gh action for prerelease support 2021-03-03 01:16:22 -05:00
Jacob Evans
3f4bb933d1
feat: v4 final (#136)
* v4 FillQuoteTransformer (#104)

* Update FQT to support v4 orders

* `@0x/contracts-zero-ex`: Tweak FQT
`@0x/contracts-zero-ex`: Drop `ERC20BridgeTransfer` event and add `PartialQuoteFill` event.

* `@0x/contracts-utils`: Add `LibSafeMathV06.downcastToUint128()`

* `@0x/protocol-utils`: Update transformer utils for V4 FQT

* `@0x/contracts-zero-ex`: Fixing FQT tests...

* `@0x/contracts-zero-ex`: rename FQT bridge event

* `@0x/contracts-zero-ex`: Un-`only` tests

* `@0x/migrations`: Update `BridgeAdapter` deployment

* `@0x/contracts-integrations`: Delete `mtx_tests`

* `@0x/protocol-utils`: Address review comments

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

* `@0x/migrations`: Update migrations

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

* v4: Asset-swapper (main branch) (#113)

* refactor quote_requestor

* WIP v4/asset-swapper: Clean up SwapQuoter and remove @0x/orderbook

* Start replacing SignedOrder everywhere

* wip: new order type

* wip

* remove order-utils from most places

* hack: Play around with VerboseX types (#119)

* hack: Play around with VerboseX types

* More hacks

* Fix up the bridgeData encodings

* Rework Orderbook return type

* feat: Don't charge a protocol fee for RFQ orders WIP (#121)

* fix simple build errors

* simplify types a little

* remove SwapQuoteCalculator: unnecessary abstraction

* Fix all ./src build errors; make types consistent

* export more types for use in 0x API; modify Orderbook interface

* stop overriding APIOrder

* feat: RFQ v4 + consolidated bridge encoders (#125)

* feat: check if taker address is contract

* Rework bridge data

* Worst case adjustments

* RFQT v4

* Future/v4 validate orders (#126)

* RFQT v4

* v4 validate native orders

* use default invalid signature

* refactor rfqt validations in swap quoter

* fix types

* fix RFQT unlisted api key

* remove priceAwareRFQFlag

* adjust maker/taker amounts

* update JSON schemas

* filter zero fillable orders

Co-authored-by: xianny <xianny@gmail.com>

* fix type export

Co-authored-by: xianny <xianny@gmail.com>

* remove order-utils as much as possible

* work on tests compile

* Comment out quote reporter test

* updated tests

* restore order-utils accidental changes

* some lints

* Remove old fill_test

* ts lint disable for now

* update quote report

* Re-enable quote report tests

* make fill data required field

* fix lint

* type guards

* force fillData as required

* fix lint

* fix naming

* exports

* adjust MultiBridge by slippage

* cleanups (checkpoint 1)

* cleanup types (checkpoint #2)

* remove unused deps

* `@0x/contract-addresses`: Deploy new FQT (#129)

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

* commit bump to republish

* DRY up the rfqt mocker

* fix: Balancer load top pools (#131)

* fix: Balancer load top 250 pools

* refetch top pools on an interval

Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>

* Update post rebase

* prettier

* Remove test helpers exported in asset-swapper

* Clean up from review comments

* prettier

* lint

* recreate rfqt mocker

* change merge and INVALID_SIGNATURE

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Xianny <8582774+xianny@users.noreply.github.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2021-02-10 19:20:15 +10:00
Github Actions
477cb0a48d Updated CHANGELOGS & MD docs 2021-01-28 21:36:22 +00:00
Lawrence Forman
3557a5e5a9
@0x/contracts-zero-ex: Update tests to work with ganache chainId of 1337 (#123)
* `@0x/contracts-zero-ex`: Update tests to work with ganache chainId of 1337

* `update org deps

* `@0x/protocol-utils`: Use `Web3Wrapper.signTypedDataAsync()` instead of removed `Web3Wrapper.signTypedDataV4Async()` (#124)

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

* `update org deps
`@0x/order-utils`: Fix broken tests

* remove lingering console.logs

Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-26 02:50:09 -05:00
Daniel Pyrathon
a7a905de4c
fix: Upgrade quote server and Asset Swapper types (and specify protocol ve… (#108)
* Upgrade quote server and Asset Swapper types (and specify protocol version in API requests)

* add package and lockfile

* fix tests
2021-01-13 17:07:45 -08:00