Skip to content

feat: add Example09 (pool-based CCVs) and Example10 (policy engine) with fork tests - #50

Merged
andrejrakic merged 4 commits into
mainfrom
feat/example09-10-pool-ccvs-and-policy-engine
Oct 20, 2026
Merged

andrejrakic merged 4 commits into
mainfrom
feat/example09-10-pool-ccvs-and-policy-engine

Conversation

@SyedAsadKazmi

@SyedAsadKazmi SyedAsadKazmi commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Adds Example09 (pool-based CCVs) and Example10 (policy engine) - scripts, book chapters, and fork tests - completing AdvancedPoolHooks coverage beyond the allowlist, with Example08's setup refactored onto a shared fork-test base.

@SyedAsadKazmi
SyedAsadKazmi requested review from a team as code owners October 18, 2026 16:35
@github-actions

Copy link
Copy Markdown

👋 SyedAsadKazmi, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@andrejrakic andrejrakic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general very good PR, thanks for opening. Added two minor comments for you to consider, but approved PR in the interest of time. Thanks

Comment thread src/ExamplePolicyEngine.sol Outdated
// ----------------------------------------------------------------

/// @notice Sets the maximum transfer amount this engine allows.
function setCap(uint256 newCap) external {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Anyone can call this function, but I can see the 10 ether cap is already defined in constructor, do we even need this function? If yes, let's add some access ownership here as a good hygiene, even though it's example contract.

Comment thread script/examples/Example10.s.sol Outdated
import {Script, console2} from "forge-std/Script.sol";

import {AdvancedPoolHooks} from "@chainlink/contracts-ccip/contracts/pools/AdvancedPoolHooks.sol";
import {IPolicyEngine} from "@chainlink/policy-management/interfaces/IPolicyEngine.sol";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unused import, I think the script should compile even without this line. Confirm please

@andrejrakic
andrejrakic self-requested a review October 20, 2026 16:18
@andrejrakic
andrejrakic merged commit 7d1c5a0 into main Oct 20, 2026
10 checks passed
@andrejrakic
andrejrakic deleted the feat/example09-10-pool-ccvs-and-policy-engine branch October 20, 2026 16:19
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