This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
asset-swapper: Exchange Proxy support #2591
Merged
dorothy-zbornak
merged 15 commits into
development
from
feat/asset-swapper/exchange-proxy-support
Jun 12, 2020
Merged
asset-swapper: Exchange Proxy support #2591
dorothy-zbornak
merged 15 commits into
development
from
feat/asset-swapper/exchange-proxy-support
Jun 12, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
from
June 1, 2020 19:29
a4dc11b
to
c4d89d6
Compare
dorothy-zbornak
requested review from
abandeali1,
BMillman19,
dave4506,
fragosti and
hysz
as code owners
June 1, 2020 19:31
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
from
June 1, 2020 20:00
c4d89d6
to
6ef4a54
Compare
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
from
June 2, 2020 05:25
fc86835
to
7cf9630
Compare
dorothy-zbornak
commented
Jun 2, 2020
@@ -44,7 +44,7 @@ | |||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", | |||
"dependencies": { | |||
"@0x/assert": "^3.0.7", | |||
"@0x/asset-swapper": "^4.4.0", | |||
"@0x/asset-swapper": "4.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧷
Base automatically changed from
feat/contracts-zero-ex/0x-api-erc20-transformers
to
development
June 3, 2020 18:09
dekz
reviewed
Jun 8, 2020
packages/asset-swapper/src/quote_consumers/exchange_proxy_swap_quote_consumer.ts
Outdated
Show resolved
Hide resolved
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
from
June 8, 2020 01:33
7cf9630
to
1a1a777
Compare
dekz
approved these changes
Jun 8, 2020
transformer: this.contractAddresses.transformers.wethTransformer, | ||
data: encodeWethTransformerData({ | ||
token: ETH_TOKEN_ADDRESS, | ||
amount: quote.worstCaseQuoteInfo.totalTakerAssetAmount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also technically be MAX_UINT256
as well right? As it's defined as what is actually sent in value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because we don't want to wrap the protocol fee.
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
4 times, most recently
from
June 9, 2020 20:50
033c434
to
2c371d0
Compare
`@0x/contract-wrappers`: Add `ITransformERC20Contract`.
… underscores in identifiers.'
`@0x/asset-swapper`: Fix ETH not being passed as the token to `transformERC20()`.
`@0x/contract-addresses`: Add `exchangeProxyGovernor`. `@0x/contract-addresses`: Add deployed EP addresses. `@0x/migrations`: Add `exchangeProxyGovernor`.
dorothy-zbornak
force-pushed
the
feat/asset-swapper/exchange-proxy-support
branch
from
June 12, 2020 04:00
ba13de8
to
0b6bcf6
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds a new swap quote consumer to
asset-swapper
,ExchangeProxySwapQuoteConsumer
, which can generate call data for the Exchange Proxy'stransformERC20()
function.ExchangeProxySwapQuoteConsumer.getCallDataOrThrowAsync()
can accept an options object:The
CalldataInfo
struct returned bygetCallDataOrThrowAsync()
from all consumers now has anallowanceTarget
field.Odds and Ends
@0x/instant
's@0x/asset-swapper
dependency to the old version to avoid constantly breaking instant.@0x/contracts-zero-ex
.ITransformERC20
contract artifacts/wrappers where necessary.ContractAddresses
. None of this stuff is deployed so they're all NULL for now.@0x/contracts-broker
tests and add them to CI.Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.