Push RFQ-T opts to own SwapQuoterOpts subnamespace
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r405963240
This commit is contained in:
parent
227676c150
commit
93872ad7a3
@ -43,8 +43,10 @@ const DEFAULT_SWAP_QUOTER_OPTS: SwapQuoterOpts = {
|
|||||||
},
|
},
|
||||||
...DEFAULT_ORDER_PRUNER_OPTS,
|
...DEFAULT_ORDER_PRUNER_OPTS,
|
||||||
samplerGasLimit: 250e6,
|
samplerGasLimit: 250e6,
|
||||||
rfqtTakerApiKeyWhitelist: [],
|
rfqt: {
|
||||||
rfqtMakerEndpoints: [],
|
takerApiKeyWhitelist: [],
|
||||||
|
makerEndpoints: [],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const DEFAULT_FORWARDER_EXTENSION_CONTRACT_OPTS: ForwarderExtensionContractOpts = {
|
const DEFAULT_FORWARDER_EXTENSION_CONTRACT_OPTS: ForwarderExtensionContractOpts = {
|
||||||
|
@ -165,8 +165,8 @@ export class SwapQuoter {
|
|||||||
this.orderbook = orderbook;
|
this.orderbook = orderbook;
|
||||||
this.expiryBufferMs = expiryBufferMs;
|
this.expiryBufferMs = expiryBufferMs;
|
||||||
this.permittedOrderFeeTypes = permittedOrderFeeTypes;
|
this.permittedOrderFeeTypes = permittedOrderFeeTypes;
|
||||||
this.rfqtTakerApiKeyWhitelist = options.rfqtTakerApiKeyWhitelist || [];
|
this.rfqtTakerApiKeyWhitelist = options.rfqt ? options.rfqt.takerApiKeyWhitelist || [] : [];
|
||||||
this.rfqtMakerEndpoints = options.rfqtMakerEndpoints || [];
|
this.rfqtMakerEndpoints = options.rfqt ? options.rfqt.makerEndpoints || [] : [];
|
||||||
this._contractAddresses = options.contractAddresses || getContractAddressesForChainOrThrow(chainId);
|
this._contractAddresses = options.contractAddresses || getContractAddressesForChainOrThrow(chainId);
|
||||||
this._devUtilsContract = new DevUtilsContract(this._contractAddresses.devUtils, provider);
|
this._devUtilsContract = new DevUtilsContract(this._contractAddresses.devUtils, provider);
|
||||||
this._protocolFeeUtils = new ProtocolFeeUtils(constants.PROTOCOL_FEE_UTILS_POLLING_INTERVAL_IN_MS);
|
this._protocolFeeUtils = new ProtocolFeeUtils(constants.PROTOCOL_FEE_UTILS_POLLING_INTERVAL_IN_MS);
|
||||||
|
@ -217,8 +217,10 @@ export interface SwapQuoterOpts extends OrderPrunerOpts {
|
|||||||
contractAddresses?: ContractAddresses;
|
contractAddresses?: ContractAddresses;
|
||||||
samplerGasLimit?: number;
|
samplerGasLimit?: number;
|
||||||
liquidityProviderRegistryAddress?: string;
|
liquidityProviderRegistryAddress?: string;
|
||||||
rfqtTakerApiKeyWhitelist?: string[];
|
rfqt?: {
|
||||||
rfqtMakerEndpoints?: string[];
|
takerApiKeyWhitelist?: string[];
|
||||||
|
makerEndpoints?: string[];
|
||||||
|
};
|
||||||
quoteRequestor?: QuoteRequestor;
|
quoteRequestor?: QuoteRequestor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user