Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: contract size limit #4

Open
wants to merge 3 commits into
base: SOV-4316-upgradeable-contract
Choose a base branch
from

Conversation

cwsnt
Copy link
Collaborator

@cwsnt cwsnt commented Aug 30, 2024

No description provided.

@cwsnt cwsnt requested a review from tjcloa August 30, 2024 15:45
import {ILBFlashLoanCallback} from "./ILBFlashLoanCallback.sol";

interface ILBPairExt {
function swap(bool swapForY, address to) external returns (bytes32 amountsOut);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is one of the most used - pls move it back to the LBPair contract.

Comment on lines +11 to +17
function mint(address to, bytes32[] calldata liquidityConfigs, address refundTo)
external
returns (bytes32 amountsReceived, bytes32 amountsLeft, uint256[] memory liquidityMinted);

function burn(address from, address to, uint256[] calldata ids, uint256[] calldata amountsToBurn)
external
returns (bytes32[] memory amounts);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mint and burn are actively used by users that manage liquidity actively which is a common case with concentrated liquidity.
consider moving them back to the LBPair contract.
another way to reduce contract size is to set optimizer_runs in foundry.tomlto a lower value, e.g. 600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants