You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
pools: {
"0x.. pool addess": {
baseSymbol: "MAGIC",
... more data can be put here to save loading time like pool configs and search keys, etc.
}
}
}
Data Flows
Flow 1: pools are whitelisted by pool address, and grouped by index = base+quote+reserve (configs and staticcall)
Flow 2: pools that user has balance, grouped by index = base+quote+reserve (scan API and staticcall)
Flow 3: pools are searched by keywords (topics), and grouped by index = base+quote+reserve (scan API and staticcall)
Flow 4: pool is specified in URL query, load it and display any cached pools with the same index
In all 3 flows, there will be pools of the same index that doesn't show in the UI on the first load, there will be a Load More Pools button (next to the leverage slide), that scan all log with topic0 == baseToken, grouped by index, store to localstorage and show to UI.
Topics
Pools now are created with 4 topics for base token search:
topic0: baseToken address (instead of event signature), this topic is used to search for all pool with the same base token address that user pasted in the search box
topics1: baseSymbol
topics2 & 3: part of baseSymbol, or other kind of search keywords that pool creator can pass for their users to find their pool easier
To search for pool with keyword MA, the filter should be:
1: using this wallet 0xE61383556642AF1Bd7c5756b13f19A63Dc8601df will have this issue and crash the UI:
react-dom.development.js:12056 Uncaught TypeError: Cannot read properties of undefined (reading 'topics')
at history.ts:152:1
at Array.map (<anonymous>)
at History.formatSwapHistory (history.ts:151:1)
at useSwapHistory.ts:52:1
at commitHookEffectListMount (react-dom.development.js:23150:1)
at commitPassiveMountOnFiber (react-dom.development.js:24926:1)
at commitPassiveMountEffects_complete (react-dom.development.js:24891:1)
at commitPassiveMountEffects_begin (react-dom.development.js:24878:1)
at commitPassiveMountEffects (react-dom.development.js:24866:1)
at flushPassiveEffectsImpl (react-dom.development.js:27039:1)
Initial load of the dapp page only load the following pools:
Search:
[more]
at the end (clicking it willl go to step 4)Whitelist pools config:
configs/<network>/pools.json
Data Flows
Flow 1: pools are whitelisted by pool address, and grouped by index = base+quote+reserve (configs and staticcall)
Flow 2: pools that user has balance, grouped by index = base+quote+reserve (scan API and staticcall)
Flow 3: pools are searched by keywords (topics), and grouped by index = base+quote+reserve (scan API and staticcall)
Flow 4: pool is specified in URL query, load it and display any cached pools with the same index
In all 3 flows, there will be pools of the same index that doesn't show in the UI on the first load, there will be a
Load More Pools
button (next to the leverage slide), that scan all log with topic0 == baseToken, grouped by index, store to localstorage and show to UI.Topics
Pools now are created with 4 topics for base token search:
To search for pool with keyword
MA
, the filter should be:The first 2 arbitrum pools:
The text was updated successfully, but these errors were encountered: