Getting Pair Lists
function getPools(uint256 begin, uint256 maxLength) external view returns (XYKPool[] memory pools) {
uint256 len = poolList.length <= begin ? 0 : Math.min(poolList.length - begin, maxLength);
pools = new XYKPool[](len);
unchecked {
for (uint256 i = begin; i < begin + len; i++) {
pools[i] = poolList[i];
}
}
}
function poolsLength() external view returns (uint256) {
return poolList.length;
}Last updated