feat: Implemented getPoolIds
This commit is contained in:
@@ -61,7 +61,14 @@ contract IntegralSwapAdapter is ISwapAdapter {
|
|||||||
override
|
override
|
||||||
returns (bytes32[] memory ids)
|
returns (bytes32[] memory ids)
|
||||||
{
|
{
|
||||||
revert NotImplemented("IntegralSwapAdapter.getPoolIds");
|
uint256 endIdx = offset + limit;
|
||||||
|
if (endIdx > factory.allPairsLength()) {
|
||||||
|
endIdx = factory.allPairsLength();
|
||||||
|
}
|
||||||
|
ids = new bytes32[](endIdx - offset);
|
||||||
|
for (uint256 i = 0; i < ids.length; i++) {
|
||||||
|
ids[i] = bytes20(factory.allPairs(offset + i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user