Skip to content

Conversation

@0xsuryansh
Copy link
Member

@0xsuryansh 0xsuryansh commented Dec 3, 2025

@0xsuryansh 0xsuryansh changed the base branch from main to develop December 3, 2025 16:54
@0xsuryansh 0xsuryansh marked this pull request as ready for review December 4, 2025 08:50
@0xsuryansh 0xsuryansh requested a review from a team as a code owner December 4, 2025 08:50
@0xsuryansh 0xsuryansh force-pushed the lombard-v2-pool-backward-compat branch from 69a6ca2 to 4d79408 Compare December 4, 2025 10:10

event LombardVerifierSet(address indexed verifier);
/// @param remoteChainSelector CCIP selector of destination chain.
/// @param lChainId The chain id of destination chain by Lombard Multi Chain Id conversion.
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatives:

  • The Lombard-specific chain ID.
  • The chain ID according to Lombard Multi Chain ID convention.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member Author

Choose a reason for hiding this comment

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

/// @param remoteChainSelector CCIP selector of destination chain.
/// @param lChainId The chain id of destination chain by Lombard Multi Chain Id conversion.
/// @param allowedCaller The address of TokenPool on destination chain allowed to handle GMP message.
event PathSet(uint64 indexed remoteChainSelector, bytes32 indexed lChainId, bytes32 allowedCaller);
Copy link
Contributor

Choose a reason for hiding this comment

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

For PathSet & PathRemoved, we should specify if Lombard depends on them & how they are used given that they are named this way for a reason.

uint8 fallbackDecimals
) TokenPool(token, _getTokenDecimals(token, fallbackDecimals), advancedPoolHooks, rmnProxy, router) {
if (address(bridge) == address(0)) {
revert ZeroBridge();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
revert ZeroBridge();
revert ZeroBridgeNotAllowed();

Copy link
Member Author

Choose a reason for hiding this comment

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

WIll fix later after confirmation from Lombard, this is from the old code


Path memory path = s_chainSelectorToPath[lockOrBurnIn.remoteChainSelector];
if (path.allowedCaller == bytes32(0)) {
revert PathNotExist(lockOrBurnIn.remoteChainSelector);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
revert PathNotExist(lockOrBurnIn.remoteChainSelector);
revert PathDoesNotExist(lockOrBurnIn.remoteChainSelector);

return super.lockOrBurn(lockOrBurnIn, blockConfirmationRequested, tokenArgs);
}

/// @notice Backwards compatible lockOrBurn for lanes using the V1 flow.
Copy link
Contributor

Choose a reason for hiding this comment

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

So the invariant here is that there will always be a pre 1.7.0 OffRamp available to process any in-flight or failed V1 Lombard messages? This is why we don't need any proxy?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

/// @param remoteChainSelector CCIP chain selector of remote chain.
/// @param lChainId Lombard chain id of remote chain.
/// @param allowedCaller The address of TokenPool on destination chain.
function setPath(uint64 remoteChainSelector, bytes32 lChainId, bytes calldata allowedCaller) external onlyOwner {
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to just accept bytes32 for allowedCaller & abi.encode it for the isRemotePool check? Then we can remove the allowedCaller length check right?

Copy link
Member Author

Choose a reason for hiding this comment

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

old Lombard function will discuss with them and change

pragma solidity ^0.8.24;

/// @custom:security-contact legal@lombard.finance
interface IBridgeV2 {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a source control issue here where some files exist in both pools/Lombard and pools/lombard

Copy link
Member Author

Choose a reason for hiding this comment

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

removed the pools/lombard folder

address verifier,
IBridgeV2 bridge,
address adapter,
address advancedPoolHooks,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove the hooks from this pool including adding

  /// @notice No-op override to purge the unused code path from the contract.
  function _postFlightCheck(Pool.ReleaseOrMintInV1 calldata, uint256, uint16) internal pure virtual override {}

  /// @notice No-op override to purge the unused code path from the contract.
  function _preFlightCheck(Pool.LockOrBurnInV1 calldata, uint16, bytes memory) internal pure virtual override {}

Copy link
Member Author

Choose a reason for hiding this comment

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

will do later, after discussion with Lombard

/// @notice Mapping of CCIP chain selector to chain specific config.
mapping(uint64 chainSelector => Path path) internal s_chainSelectorToPath;

constructor(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's at least add comments for the lombard params, what an adapter is and that it's optional

Copy link
Member Author

Choose a reason for hiding this comment

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

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Metric lombard-v2-pool-backward-compat develop
Coverage 69.4% 68.8%

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