diff --git a/governance/xc_admin/packages/xc_admin_common/src/propose.ts b/governance/xc_admin/packages/xc_admin_common/src/propose.ts index 6cbac903..52a046ff 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/propose.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/propose.ts @@ -64,6 +64,9 @@ export async function proposeInstructions( } const batches = batchIntoExecutorPayload(instructions); + if (255 <= batches.length) { + throw new Error("A proposal can only support 255 instructions"); + } for (const [i, batch] of batches.entries()) { const squadIx = await wrapAsRemoteInstruction( squad, @@ -86,6 +89,9 @@ export async function proposeInstructions( ); } } else { + if (255 <= instructions.length) { + throw new Error("A proposal can only support 255 instructions"); + } for (let i = 0; i < instructions.length; i++) { ixToSend.push( await squad.buildAddInstruction(