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

Refactor/fit periphery #9

Merged
merged 9 commits into from
Aug 28, 2024
Merged

Refactor/fit periphery #9

merged 9 commits into from
Aug 28, 2024

Conversation

chefburger
Copy link
Contributor

Some necessary updates to fit the v4-periphery

.gitmodules Outdated
Comment on lines 1 to 3
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think it might be a good idea if we keep this forge-std dependency?

1/ what we are doing means that if we somehow need to update forge-std to get newer feature, we are forced to rely on dependency -- where we might not want to touch v4-core and v4-periphery since the code has frozen

2/ and so far i think forge-std have not caused us any conflicts yet

3/ we do this for oz to prevent conflicts due to breaking changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

same for forge-gas-snapshot probably

@chefburger
Copy link
Contributor Author

should fix #8

@@ -11,12 +11,7 @@ optimizer_runs = 1000
via_ir = true
evm_version = 'cancun'
ffi = true
fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've put the remapping settings into remappings.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can also consider using UniversalRouter here if u guys prefer

Copy link
Collaborator

@ChefMist ChefMist Aug 28, 2024

Choose a reason for hiding this comment

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

yeh.. ideally it should be MockUniversalRouter i guess.. better to educate just universal router instead of universal router + swap router

(though not urgent)

Copy link
Contributor Author

@chefburger chefburger Aug 28, 2024

Choose a reason for hiding this comment

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

cool, will handle it in separate PR. i've added an issue to track this.

BinPositionManager(_vault, _binPoolManager, _permit2)
{}

function addLiquidity(IBinPositionManager.BinAddLiquidityParams calldata params)
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting.. i wonder if we should ask the hook dev to use this kind of contract

context: they can't use universal to swap as universal router have re-entrancy guard

Comment on lines 45 to 51
// Vm.Log[] memory entries = vm.getRecordedLogs();
// // find IBinFungibleToken.TransferBatch
// for (uint256 i = 0; i < entries.length; i++) {
// if (entries[i].topics[0] == keccak256("TransferBatch(address,address,address,uint256[],uint256[])")) {
// (tokenIds, liquidityMinted) = abi.decode(entries[i].data, (uint256[], uint256[]));
// }
// }
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we delete this or its purposely meant to be commented?

@chefburger chefburger merged commit 75f5bbd into main Aug 28, 2024
1 check passed
@chefburger chefburger deleted the refactor/fit-periphery branch August 28, 2024 10:11
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.

3 participants