-
Notifications
You must be signed in to change notification settings - Fork 465
asset-swapper: RFQ-T indicative quotes #2555
Conversation
packages/asset-swapper/src/utils/market_operation_utils/fills.ts
Outdated
Show resolved
Hide resolved
@@ -92,10 +88,25 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = | |||
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined |
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.
Since we merge defaults into _opts
, and never access it further down, do we need the opts !== undefined
check?
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 was a bug, that I noticed too, and fixed here: d6d4d29#diff-bdb1465a97651026c09ef607e5de9e6fR97
@@ -16,7 +16,9 @@ export const samplerOperations = { | |||
.getABIEncodedTransactionData(); | |||
}, | |||
handleCallResultsAsync: async (contract, callResults) => { | |||
return contract.getABIDecodedReturnData<BigNumber[]>('getOrderFillableTakerAssetAmounts', callResults); | |||
return contract | |||
.getABIDecodedReturnData<BigNumber[]>('getOrderFillableTakerAssetAmounts', callResults) |
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.
I'm assuming they're not signing the orders where the intent to fill is false? Rather than use takerAddress
as a conditional can we determine this off the signature, or lack there of?
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.
I'm sorry, I wrote this commit while blindly following the spec I wrote. In retrospect, this idea, of making the sampler bypass fillability checks because these orders are unsigned, is moot now.
This is because we're getting indicative quotes in parallel with the on-chain call, not prior to it (like we do for firm quotes), and we're piping the quotes directly into the order router, and there's no further fillability check after routing*, so there's no need for such a hack.
It was only ever consideration when we were trying to decide whether to request quotes from SwapQuoter
or from MarketOperationUtils
, but ultimately we decided to do both (for latency reasons), alleviating the need for this.
*: Of course there's the gas estimation / transaction validation stage that happens in the 0x-api side, but you'll see there that I'm forcing skipValidation
to true when handling /swap/price
requests and delegating them to the handler for /swap/quote
.
packages/asset-swapper/src/utils/market_operation_utils/fills.ts
Outdated
Show resolved
Hide resolved
packages/asset-swapper/src/utils/market_operation_utils/fills.ts
Outdated
Show resolved
Hide resolved
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.
Nice work! Added a few comments. I can't speak to the "paths" much though, will defer to Jacob & Lawrence on the feedback there.
packages/asset-swapper/src/utils/market_operation_utils/constants.ts
Outdated
Show resolved
Hide resolved
packages/asset-swapper/src/utils/market_operation_utils/fills.ts
Outdated
Show resolved
Hide resolved
packages/asset-swapper/src/utils/market_operation_utils/index.ts
Outdated
Show resolved
Hide resolved
@@ -165,11 +171,26 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = |
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.
At what point do we want to short-circuit considering RFQT MMers will not suppot buys to begin with?
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.
seems ok to leave in, depends on the ETA for buyAmount
support in RFQT?
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.
I'd be down to leave it in if we can get it looking nicer.
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 is my attempt at making it look nicer: 5effc6e
packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Outdated
Show resolved
Hide resolved
return responses; | ||
} | ||
|
||
private _isValidRfqtIndicativeQuoteResponse(response: RfqtIndicativeQuoteResponse): boolean { |
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.
I think this is OK for now, but it may be nice in the future to introduce a proper JSON schema
file for this.
There's one subtlety here: apiKey has been moved to be within the rfqt namespace, after talking to Fabio and discovering that he only needs to re-use the API key in 0x API, not in asset-swapper.
For use in upcoming implementation of indicative quotes.
These changes have been exercised via mocha tests in the 0x-api repo. Not sure why I had to add GetMarketOrdersRfqtOpts to the package exports. `yarn test:generate_docs:circleci` said: $ node ./packages/monorepo-scripts/lib/doc_generate.js --package @0x/asset-swapper GENERATE_DOCS: Generating Typedoc JSON for @0x/asset-swapper... GENERATE_DOCS: Generating Typedoc Markdown for @0x/asset-swapper... GENERATE_DOCS: Modifying Markdown To Exclude Unexported Items... Error: @0x/asset-swapper package needs to export: GetMarketOrdersRfqtOpts From it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_MAP. at DocGenerateUtils._lookForMissingReferenceExportsThrowIfExists (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:288:19) at DocGenerateUtils.<anonymous> (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:255:34) at step (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:32:23) at Object.next (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:13:53) at fulfilled (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:4:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7)
6c62c33
to
45bc967
Compare
@@ -34,6 +35,7 @@ export enum ERC20BridgeSource { | |||
CurveUsdcDaiUsdtTusd = 'Curve_USDC_DAI_USDT_TUSD', | |||
LiquidityProvider = 'LiquidityProvider', | |||
CurveUsdcDaiUsdtBusd = 'Curve_USDC_DAI_USDT_BUSD', | |||
Rfqt = 'Rfqt', |
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.
Is this used anywhere?
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, it's not. It's a remnant from the first draft. I've removed it here: 4cc9cea
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.
Added a few comments. Overall looking quite good tho! Definitely would love a blessing from @dekz or @dorothy-zbornak so we can have a vote of confidence on all the sampling / path stuff though.
makerAddress: NULL_ADDRESS, | ||
senderAddress: NULL_ADDRESS, | ||
feeRecipientAddress: NULL_ADDRESS, | ||
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(), |
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.
What's up with this comment? Can we leave as zero?
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.
Oh good eye. This method was basically copied from
function createCommonBridgeOrderFields(opts: CreateOrderFromPathOpts): CommonBridgeOrderFields { |
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.
I don't think it matters since it's not signed and not intended to be used in anyway, just a vessel for the amounts.
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.
Yeah it shouldn't matter. Might even be better to make these orders as unfillable as possible.
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.
I've cleaned up this function here: ad7868e
@@ -92,10 +93,25 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = |
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.
When would _opts
ever be undefined?
Can make either make this ternary shorter, or break it out into something else? This feels a bit jarring to read
One option (still a pretty long statement for ternary tho)
const rfqtIndicativeQuotes = _opts.rfqt && _opts.rfqt.quoteRequestor ? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...) : Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
Another option
let rfqtIndicativeQuotesPromise = Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
if (_opts.rfqt && _opts.rfqt.quoteRequestor) {
rfqtIndicativeQuotesPromise = _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...)
}
Third option (I like this best)
const rfqtIndicativeQuotes = async (): Promise<RfqtIndicativeQuoteResponse[]> => {
if (_opts.rfqt && _opts.rfqt.quoteRequestor) {
return _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...);
}
return [];
}
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.
I cleaned this up here: 5effc6e
Please let me know what you think.
senderAddress: NULL_ADDRESS, | ||
feeRecipientAddress: NULL_ADDRESS, | ||
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(), | ||
expirationTimeSeconds: new BigNumber(Math.floor(Date.now() / ONE_SECOND_MS) + ONE_HOUR_IN_SECONDS), |
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.
In a future revision I def think we should expect an expirationTimeSeconds from the MMer and use that here
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.
Can probably just set this to zero as well.
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.
I put it at zero for now: ad7868e
takerFee: ZERO_AMOUNT, | ||
fillableTakerFeeAmount: ZERO_AMOUNT, | ||
signature: WALLET_SIGNATURE, | ||
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context? |
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.
I think you can pass it in from MarketOperationUtils
's this._orderDomain
but will let @dekz or @dorothy-zbornak chime in here if there's a better way
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.
both chainId
and exchangeAddress
are in the order domain.
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.
I just set them both to zero for now, per #2555 (comment)
packages/asset-swapper/src/utils/market_operation_utils/orders.ts
Outdated
Show resolved
Hide resolved
takerFee: ZERO_AMOUNT, | ||
fillableTakerFeeAmount: ZERO_AMOUNT, | ||
signature: WALLET_SIGNATURE, | ||
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context? |
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.
both chainId
and exchangeAddress
are in the order domain.
makerAssetData: string, | ||
takerAssetData: string, | ||
assetFillAmount: BigNumber, | ||
): { buyToken: string; sellToken: string; buyAmount: string | undefined; sellAmount: string | undefined } { |
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.
): { buyToken: string; sellToken: string; buyAmount: string | undefined; sellAmount: string | undefined } { | |
): { buyToken: string; sellToken: string; buyAmount?: string; sellAmount?: string } { |
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.
I made this change here: 2c97208
makerAddress: NULL_ADDRESS, | ||
senderAddress: NULL_ADDRESS, | ||
feeRecipientAddress: NULL_ADDRESS, | ||
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(), |
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.
I don't think it matters since it's not signed and not intended to be used in anyway, just a vessel for the amounts.
@@ -165,11 +171,26 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = |
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.
seems ok to leave in, depends on the ETA for buyAmount
support in RFQT?
packages/asset-swapper/src/types.ts
Outdated
export interface RfqtRequestOpts { | ||
takerAddress: string; | ||
apiKey: string; | ||
intentOnFilling?: boolean; |
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.
should we force the default on this early on if it's not set to false
?
intentOnFilling?: boolean; | |
intentOnFilling: boolean; |
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.
I made this change here: 245b6da
@@ -165,11 +176,26 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = | |||
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined |
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.
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined | |
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined |
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.
Fixed by consolidating this crazy conditional with the other instance of it here: 5effc6e
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.
Some minor suggestions, but looks pretty good!
calcOpts.rfqt && | ||
!calcOpts.rfqt.intentOnFilling && | ||
calcOpts.rfqt.apiKey && | ||
this._rfqtTakerApiKeyWhitelist.includes(calcOpts.rfqt.apiKey) |
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.
Maybe these conditions (minus the intentOnFilling
check) could be put into a function like isRfqtEnabled(opts.rfqt)
since there are two places where this happens.
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.
I simplified this here: ba2ac6a
@@ -165,11 +171,26 @@ export class MarketOperationUtils { | |||
this._liquidityProviderRegistry, | |||
), | |||
); | |||
const rfqtPromise = |
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.
I'd be down to leave it in if we can get it looking nicer.
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined | ||
? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync( | ||
nativeOrders[0].makerAssetData, | ||
nativeOrders[0].takerAssetData, | ||
takerAmount, | ||
MarketOperation.Sell, | ||
_opts.rfqt, | ||
) | ||
: Promise.resolve<RfqtIndicativeQuoteResponse[]>([]); |
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.
Can't we just put this all into a function like getRfqtIndicativeQuotesAsync(nativeOrders, takerAmount, MarketOpreration.Sell, _opts.rfqt)
?
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.
Great idea, thank you, did it here: 5effc6e
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined | ||
? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync( | ||
nativeOrders[0].makerAssetData, | ||
nativeOrders[0].takerAssetData, | ||
takerAmount, | ||
MarketOperation.Sell, | ||
_opts.rfqt, | ||
) | ||
: Promise.resolve<RfqtIndicativeQuoteResponse[]>([]); |
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.
Promise.resolve()
is probably unnecessary here.
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.
I tried to remove it and got errors.
makerAddress: NULL_ADDRESS, | ||
senderAddress: NULL_ADDRESS, | ||
feeRecipientAddress: NULL_ADDRESS, | ||
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(), |
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.
Yeah it shouldn't matter. Might even be better to make these orders as unfillable as possible.
senderAddress: NULL_ADDRESS, | ||
feeRecipientAddress: NULL_ADDRESS, | ||
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(), | ||
expirationTimeSeconds: new BigNumber(Math.floor(Date.now() / ONE_SECOND_MS) + ONE_HOUR_IN_SECONDS), |
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.
Can probably just set this to zero as well.
takerAddress === undefined || | ||
takerAddress === '' || |
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.
takerAddress === undefined || | |
takerAddress === '' || | |
!takerAddress || |
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.
I made this change here: 83289bc
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context? | ||
exchangeAddress: NULL_ADDRESS, // HACK !!!!!!!!! how can we get at this from this context? |
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.
Neither of these really matter since these orders aren't valid anyway, so I'm fine with leaving it as-is and making the comments less frightening lol
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.
I did just that: ad7868e
Thank you
Validate that the responses returned from maker endpoints both conform to expected JSON schema data types and also have the expected asset data, per the taker's request.
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
Addresses review comment #2555 (comment)
dc339d6
to
03ed3ac
Compare
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.
LGTM let's try this puppy out.
I feel good about all the outstanding changes I requested -- nice work! |
opts.rfqt, | ||
); | ||
} else { | ||
return Promise.resolve<RfqtIndicativeQuoteResponse[]>([]); |
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.
Can't we just return [];
here?
Note: this is a nit, don't need to change
assetFillAmount: BigNumber, | ||
opts: Partial<GetMarketOrdersOpts>, | ||
): Promise<RfqtIndicativeQuoteResponse[]> { | ||
if (opts.rfqt && opts.rfqt.quoteRequestor) { |
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.
NOTE: This is where we need to ensure intentOnFilling
is to true
I tried to get fancy back in 5effc6e. I changed something more than the single refactor targetted by the commit, and it broke things! This reverts part of that commit, restoring clean runs of 0x API tests.
f953647
to
153533f
Compare
return opts !== undefined && !opts.intentOnFilling && this._rfqtTakerApiKeyWhitelist.includes(opts.apiKey); | ||
return ( | ||
opts !== undefined && | ||
opts.isIndicative !== undefined && |
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.
dont need this undefined check
takerAddress: string; | ||
apiKey: string; | ||
intentOnFilling: boolean; | ||
isIndicative?: boolean; |
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.
Nit but would prefer for this to be required
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.
LGTM
* Adapt to asset-swapper RFQ-T option restructuring A handful of RFQ-T options were restructured in 0xProject/0x-monorepo@957e3eb This adapts to those changes. * Support for RFQ-T indicative quotes Renamed method getSwapQuoteAsync() to _getSwapQuoteAsync(), and created a new getSwapQuoteAsync() to delegeate to it, all for the purposes of also calling into _getSwapQuoteAsync() of the newly introduced method getSwapPriceAsync(). Unfortunately, the diff looks noisy because the old public method was changed to be private, forcing it to move down below publics in the method order. This resulted resulting in my diff viewer showing that two previously existing methods (getSwapPricesAsync() [notice that one's plural, not to be confused with the aforementioned singular version] and getTokenPricesAsync()) moved UP in the diff. Those two existing methods have not changed, and it's easier to review this commit if you understand the pattern they contribute to the overall diff. * Remove Rfqt from gasSchedule * Relay source breakdown to price endpoint consumer * Log orders underlying indicative quotes Log the orders that are used to construct indicative quotes. These are "dummy" orders, but for now we need to see them in the logs in order to verify that indicative quotes are being served, since there is no separate source for RFQ-T (they are lumped in with the '0x' source.) Long term, this log entry may prove useful if it isn't too noisy. If it is, we can remove it after manual testing. * Incorporate API key into GetSwapQuoteRequestParams Addresses review comment #172 (comment) * Get Forwarder address once, not every req Addresses (at least part of) review comment #172 (comment) * Accommodate asset-swpr's now-req'd intentOnFilling See 0xProject/0x-monorepo#2555 (comment) * pin asset-swapper to monorepo commit * Add the correct CORS headers * Ran prettier * Revert "Ran prettier" This reverts commit b8641c0. * Revert "Add the correct CORS headers" This reverts commit 03b3ac1. * Test case for weird zero order from indicative When the client gives an API key and a taker address, but not saying intentOnFilling=true, the process is falling into an indicative quote mode, and a weird "all zeroes" order (zero salt, NULL_ADDRESS exchange address, etc) was being included in the order salad. * Fix for weird zero orders. depends on new AS Utilize the new `isIndicative` flag provided by asset-swapper in order to indicate when indicative quotes should NOT be solicited. * Remove diagnostic logging of indicative quotes Addresses review comment #172 (comment) * update monorepo pin * Add test of indicative w/ intentOnFilling omitted * Clarify RFQ-T enablement logic * Make axios retryable only when desired (#185) * update monorepo pin to development branch commit Co-authored-by: Daniel Pyrathon <[email protected]> Co-authored-by: Steve Klebanoff <[email protected]>
When a request specifies a whitelisted API key, and a taker address, and does not specify
intentToFill=true
, theSwapQuoter
passes itsQuoteRequestor
intoMarketOperationUtils
, so that it can callQuoteRequestor.getRfqtIndicativeQuotesAsync()
, which it transforms into weird pseudo-native-orders, which in turn get fed into order routing along with all of the other native orders.This code is not yet covered with tests here, but is being exercised in the end-to-end test in 0xProject/0x-api#172, which is integrated with CI there, and which is living at 0xProject/0x-api@66c9d9d#diff-491d90fb8eb25e485b3d8c9429e6754cR326.