Skip to content

wrapped pool#1682

Draft
RensR wants to merge 25 commits intomainfrom
Wrapped-pool
Draft

wrapped pool#1682
RensR wants to merge 25 commits intomainfrom
Wrapped-pool

Conversation

@RensR
Copy link
Collaborator

@RensR RensR commented Feb 17, 2026

This PR introduces a new pool that's also a token. It also adds a new default token for CCIP, which is TokenPoolFactory compliant

/// @param newOwner The address to grant the DEFAULT_ADMIN_ROLE to, which can be used to transfer the CCIPAdmin role.
/// If address(0) is passed, the deployer will be used as the owner. This address will receive the preMinted tokens,
/// if any.
struct ConstructorParams {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

had to do this to avoid stack too deep in CCT Pool

@RensR RensR force-pushed the Wrapped-pool branch 3 times, most recently from 9fa809c to 987b2f8 Compare February 23, 2026 17:18
@RensR RensR marked this pull request as ready for review February 23, 2026 17:38
@RensR RensR requested a review from a team as a code owner February 23, 2026 17:38
address router
)
BaseERC20(tokenParams)
TokenPool(IERC20(address(this)), tokenParams.decimals, advancedPoolHooks, rmnProxy, router)
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, address(token).code.length > 0 check happens inside TokenPool constructor, possible for it to be empty at constructor time? I thought that was the default behavior

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's still 0 at constructor time, this failed in all tests before this change

@RensR RensR marked this pull request as draft February 24, 2026 09:27
@RensR RensR force-pushed the Wrapped-pool branch 4 times, most recently from 8ac77c0 to 7c0df5c Compare March 10, 2026 10:11
@github-actions
Copy link

Metric Wrapped-pool develop
Coverage 70.1% 69.7%

ConstructorParams memory args,
address burnMintRoleAdmin,
address owner
) BaseERC20(args) AccessControlDefaultAdminRules(0, owner == address(0) ? msg.sender : owner) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

since this is for external use, I don't imagine most people have timelock, maybe by default we should set a non-zero delay, or accept as a constructor param, for AccessControlDefaultAdminRules?

function supportsInterface(
bytes4 interfaceId
) public view virtual returns (bool) {
return interfaceId == type(IERC20).interfaceId || interfaceId == type(IGetCCIPAdmin).interfaceId;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: missing IERC165 interface check

@RensR RensR changed the base branch from develop-bak to main March 17, 2026 14:34
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