Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions src/components/PageContent/PageContent.astro
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,53 @@ const { titleHeading, disableDefaultStyles, hideTitle } = Astro.props
}

/*
Accordions are deliberately excluded from the top-margin rhythm above, so that a
run of stacked accordions stays flush and reads as one continuous list. The side
effect is that the FIRST accordion of a run sits jammed against whatever precedes
AnchoredAccordion owns the gap above it, the same way every other block in the
rhythm above does, so nothing that precedes it (an Aside, a heading's divider)
sits flush against it. After h4–h6 it takes the tighter heading gap, matching the
heading rules further down.

A stacked run stays flush so it reads as one continuous list. Every accordion is
followed by the <style is:inline> it emits (in production builds too, not just
`astro dev`), and in dev the first one on a page also by its <script>, so a bare
`accordion + accordion` never matches. These selectors look past up to two of them.
*/
:where(&, & section, & astro-slot, & astro-island) {
> astro-anchored-accordion {
margin-top: var(--space-5x);
}

> :is(astro-accordion, astro-anchored-accordion) + astro-anchored-accordion,
> :is(astro-accordion, astro-anchored-accordion) + :is(style, script) + astro-anchored-accordion,
> :is(astro-accordion, astro-anchored-accordion)
+ :is(style, script)
+ :is(style, script)
+ astro-anchored-accordion {
margin-top: 0;
}
}

:where(&, & section) > :is(h4, h5, h6) + astro-anchored-accordion {
margin-top: var(--space-3x);
}

/*
The Quickstart Accordion (astro-accordion) is still excluded from the top-margin
rhythm, so the FIRST accordion of a run would sit jammed against whatever precedes
it (e.g. a DocCards grid). Fix it the same way Quickstart.astro and
CRETemplate.astro already do: the preceding element supplies the gap via :has().
This relies on `+` adjacency, which breaks after any component that ends in a
<style is:inline> (e.g. Aside); that is why AnchoredAccordion owns its gap instead.

Headings are excluded because they already carry their own padding-bottom, and an
accordion run reads better hugging the heading it belongs to.
Headings are excluded because they already carry their own padding-bottom, and a
Quickstart Accordion run reads better hugging the heading it belongs to.

NOTE: :is() here is load-bearing — do not "tidy" it to :where(). The
`* { margin-bottom: 0 }` reset above is specificity (0,1,1); :where() would zero
the parent out and this rule would silently lose at (0,0,2). That is exactly why a
plain `margin-bottom` on a component's own class (e.g. .cards) has no effect here.
*/
:is(&, & section, & astro-slot, & astro-island)
> :not(astro-accordion, astro-anchored-accordion, h1, h2, h3, h4, h5, h6):has(
+ :is(astro-accordion, astro-anchored-accordion)
) {
> :not(astro-accordion, astro-anchored-accordion, h1, h2, h3, h4, h5, h6):has(+ astro-accordion) {
margin-bottom: var(--space-5x);
}

Expand Down
22 changes: 18 additions & 4 deletions src/config/sidebar/ccip-dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
url: "ccip/concepts/cross-chain-token/token-issuer-guide",
pageId: "ccip-cct-token-issuer-guide",
},
{
title: "Advanced Pool Hooks",
url: "ccip/concepts/cross-chain-token/advanced-pool-hooks",
pageId: "ccip-cct-advanced-pool-hooks",
},
{
title: "Rate Limits",
url: "ccip/evm/concepts/cross-chain-token/rate-limits",
Expand Down Expand Up @@ -524,11 +529,20 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
pageId: "set-token-transfer-fee-config",
},
{
title: "Set Advanced Pool Hooks",
url: "ccip/evm/tutorials/cross-chain-tokens/set-advanced-pool-hooks-foundry",
highlightAsCurrent: ["ccip/evm/tutorials/cross-chain-tokens/set-advanced-pool-hooks-hardhat"],
title: "Configure a Sender Allowlist with AdvancedPoolHooks",
url: "ccip/evm/tutorials/cross-chain-tokens/configure-sender-allowlist-advanced-pool-hooks-foundry",
highlightAsCurrent: [
"ccip/evm/tutorials/cross-chain-tokens/configure-sender-allowlist-advanced-pool-hooks-hardhat",
],
chainTypes: ["evm"],
pageId: "configure-sender-allowlist-advanced-pool-hooks",
},
{
title: "Enforce ACE Policies on CCIP Token Transfers",
url: "ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-foundry",
highlightAsCurrent: ["ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-hardhat"],
chainTypes: ["evm"],
pageId: "set-advanced-pool-hooks",
pageId: "enforce-ace-policies",
},
{
title: "Migration Guides",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ The built-in contract type defines the two supported hook functions and includes

If you are new to ACE Policy Manager, start with the [Policy Manager Quick Start](/ace/getting-started/policy-manager). It introduces Policy Engines, targets, policy types, policy instances, and protections. To understand how extractors convert calldata into named parameters for policies, read [Policy Management Concepts](/ace/concepts/policy-management#the-extractor-and-mapper-pattern).

For the broader CCIP architecture, supported capabilities, and hook lifecycle, read [Advanced Pool Hooks](/ccip/concepts/cross-chain-token/advanced-pool-hooks).

You should also understand how [CCIP Token Pools](/ccip/concepts/cross-chain-token/evm/token-pools) lock or burn tokens on the source chain and release or mint tokens on the destination chain.

For each EVM chain where you want to enforce policies, you need:

- Access to the [Chainlink Platform](https://app.chain.link) and a completed [ACE account setup](/ace/getting-started/account-setup).
- An ACE-enabled organization on the [Chainlink Platform](https://app.chain.link) and a completed [ACE account setup](/ace/getting-started/account-setup).
- A Policy Engine deployed on the chain.
- An `AdvancedPoolHooks` contract deployed on the chain.
- The Token Pool on that chain configured to use the hook and included in the hook's authorized callers.
Expand Down Expand Up @@ -211,6 +213,7 @@ If `to` appears in the destination Reject policy instance's denylist, destinatio

## Next steps

- [Enforce ACE policies on CCIP token transfers using Foundry](/ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-foundry) or [Hardhat](/ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-hardhat): connect hooks to Policy Engines on a working CCT lane and exercise preflight and postflight rejections with live transfers.
- [Manage policy instances](/ace/guides/policy-manager/manage-policies)
- [Review or update target protections](/ace/guides/policy-manager/manage-protections)
- [Plan policy ordering and composition](/ace/concepts/policy-ordering)
Expand Down
5 changes: 4 additions & 1 deletion src/content/ace/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3640,11 +3640,13 @@ The built-in contract type defines the two supported hook functions and includes

If you are new to ACE Policy Manager, start with the [Policy Manager Quick Start](/ace/getting-started/policy-manager). It introduces Policy Engines, targets, policy types, policy instances, and protections. To understand how extractors convert calldata into named parameters for policies, read [Policy Management Concepts](/ace/concepts/policy-management#the-extractor-and-mapper-pattern).

For the broader CCIP architecture, supported capabilities, and hook lifecycle, read [Advanced Pool Hooks](/ccip/concepts/cross-chain-token/advanced-pool-hooks).

You should also understand how [CCIP Token Pools](/ccip/concepts/cross-chain-token/evm/token-pools) lock or burn tokens on the source chain and release or mint tokens on the destination chain.

For each EVM chain where you want to enforce policies, you need:

- Access to the [Chainlink Platform](https://app.chain.link) and a completed [ACE account setup](/ace/getting-started/account-setup).
- An ACE-enabled organization on the [Chainlink Platform](https://app.chain.link) and a completed [ACE account setup](/ace/getting-started/account-setup).
- A Policy Engine deployed on the chain.
- An `AdvancedPoolHooks` contract deployed on the chain.
- The Token Pool on that chain configured to use the hook and included in the hook's authorized callers.
Expand Down Expand Up @@ -3828,6 +3830,7 @@ If `to` appears in the destination Reject policy instance's denylist, destinatio

## Next steps

- [Enforce ACE policies on CCIP token transfers using Foundry](/ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-foundry) or [Hardhat](/ccip/evm/tutorials/cross-chain-tokens/enforce-ace-policies-hardhat): connect hooks to Policy Engines on a working CCT lane and exercise preflight and postflight rejections with live transfers.
- [Manage policy instances](/ace/guides/policy-manager/manage-policies)
- [Review or update target protections](/ace/guides/policy-manager/manage-protections)
- [Plan policy ordering and composition](/ace/concepts/policy-ordering)
Expand Down
Loading
Loading