GLAMIDL Reference

update_layerzero_oft_route

Update Layerzero Oft Route configuration action.

Handler narrative

  1. Load the GLAM state or program account required by the instruction and verify the signer.
  2. Verify that the integration is enabled on the vault and that the caller has the required delegate permission or owner authority.
  3. 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

ArgumentTypeNotes
routeLayerzeroOftRouteRoute configuration entry used to add, update, or remove an allowed bridge route. Fields: source_mint: pubkey - Solana mint eligible for the route.; destination_chain: u32 - LayerZero destination chain identifier.; destination_recipient: pubkey - Destination recipient encoded as a public key field.; provider_program: pubkey - Bridge provider program for the route.; management_mode: RouteManagementMode - Whether unmanaged, managed, or either transfer mode is allowed.; min_amount: u64 - Minimum amount accepted by the route.; max_amount: u64 - Maximum amount accepted by the route.

Policy & permissions

  • Enable the Bridge integration program before LayerZero OFT or managed-transfer actions.
  • Only the owner is expected. Delegates do not receive this capability by being added; it must be granted explicitly if supported.

TypeScript SDK usage

await glamClient.bridge.updateLayerzeroOftRoute(route);

Cross-instruction constraints

  • No additional cross-instruction constraint is documented beyond account initialization, authority checks, and policy validation.