CCTP IntegrationProduction
set_cctp_policy
Sets allowed CCTP destination domains and recipients.
Handler narrative
- Load the GLAM state or program account required by the instruction and verify the signer.
- Verify that the integration is enabled on the vault and that the caller has the required delegate permission or owner authority.
- Validate the instruction-specific policy, then invoke the external protocol with the vault authority where required.
Required conditions
- The submitted accounts must match the declared account list, signer requirements, writable requirements, fixed program addresses, and account relationships shown below.
- The GLAM state account is the source of truth for owner, enabled integrations, delegate permissions, policies, assets, borrowable assets, timelock settings, mint linkage, and pricing records.
- The vault integration ACL must enable this integration before the instruction is accepted; that enablement is defined on the GLAM state account.
- If the signer is not the owner, the delegate ACL on the GLAM state must contain the exact protocol permission required by this instruction; registering a delegate alone is insufficient.
- Instruction-specific destination accounts must satisfy the external protocol's own account model; GLAM validates the accounts it needs for authorization and policy enforcement, then passes the remaining protocol accounts through CPI.
- Configuration changes must pass owner or authorized-manager checks and, when the state or mint timelock is active, must follow the propose/apply timing model instead of taking effect immediately.
Accounts
Uses the standard Big Seven account pattern; no instruction-specific accounts beyond it.
Arguments
| Argument | Type | Notes |
|---|---|---|
| policy | CctpPolicy | Policy object written to GLAM state for this program or integration. Fields: allowed_destinations: vec<CctpDestination> - Allowed CCTP destination domain/address pairs. |
Policy & permissions
- The CCTP Integration integration must be enabled on the vault before this instruction can run.
- Only the owner is expected. Delegates do not receive this capability by being added; it must be granted explicitly if supported.
- Policy changes should be governed by owner controls and timelock settings.
TypeScript SDK usage
const policy = new CctpPolicy([
{ domain: destinationDomain, address: destinationAddress },
]);
await glamClient.access.setProtocolPolicy(
glamClient.extCctpProgram.programId,
0b01,
policy.encode(),
);Cross-instruction constraints
- No additional cross-instruction constraint is documented beyond account initialization, authority checks, and policy validation.