Optional
Readonly
apiReadonly
apiReadonly
axiosReadonly
chainReadonly
customReadonly
extReadonly
liquidityStatic
Readonly
OneStatic
cachedPrivate
make1Rest
...params: MakeCallParamsRest
...params: MakeCallParamsProtected
testStatic
buildOptional
optionalParams: Partial<OneInchAggregatorHelperParams>Static
createStatic
provideGenerated using TypeDoc
Remarks
This cache (without expiry) is introduced to avoid calling the
liquiditySources
endpoint lots of time.The routing algorithm will call AggregatorHelper#makeCall a lot. As OneInchAggregatorHelper#makeCall depend on OneInchAggregatorHelper#getLiquiditySources, and liquidity sources is is very unlikely to change (and should be the same accross multiple call), the liquidity sources should be cache.
To invalidate the cache, simply clear this map.
But for better behaviour customization, it is recommended to pass in a custom OneInchAggregatorHelperParams#liquiditySourcesProvider.