diff --git a/src/svm/instructionParamsUtils.ts b/src/svm/instructionParamsUtils.ts index 63be90e50..dd5f8cf63 100644 --- a/src/svm/instructionParamsUtils.ts +++ b/src/svm/instructionParamsUtils.ts @@ -120,7 +120,7 @@ export async function loadFillV3RelayParams( /** * Loads requestV3 slow fill parameters. */ -export async function loadRequestSlowFillParams(program: Program, signer: Keypair, relayData: RelayData) { +export async function loadRequestV3SlowFillParams(program: Program, signer: Keypair, relayData: RelayData) { // Close the instruction params account if the caller has used it before. await closeInstructionParams(program, signer); @@ -128,7 +128,7 @@ export async function loadRequestSlowFillParams(program: Program, sign const maxInstructionParamsFragment = 900; // Should not exceed message size limit when writing to the data account. const accountCoder = new LargeAccountsCoder(program.idl); - const instructionParamsBytes = await accountCoder.encode("requestSlowFillParams", { relayData }); + const instructionParamsBytes = await accountCoder.encode("requestV3SlowFillParams", { relayData }); const loadInstructions: TransactionInstruction[] = []; loadInstructions.push( @@ -154,7 +154,7 @@ export async function loadRequestSlowFillParams(program: Program, sign /** * Loads executeV3 slow relay leaf parameters. */ -export async function loadExecuteSlowRelayLeafParams( +export async function loadExecuteV3SlowRelayLeafParams( program: Program, signer: Keypair, slowFillLeaf: SlowFillLeaf, @@ -168,7 +168,7 @@ export async function loadExecuteSlowRelayLeafParams( const maxInstructionParamsFragment = 900; // Should not exceed message size limit when writing to the data account. const accountCoder = new LargeAccountsCoder(program.idl); - const instructionParamsBytes = await accountCoder.encode("executeSlowRelayLeafParams", { + const instructionParamsBytes = await accountCoder.encode("executeV3SlowRelayLeafParams", { slowFillLeaf, rootBundleId, proof, diff --git a/test/svm/SvmSpoke.SlowFill.AcrossPlus.ts b/test/svm/SvmSpoke.SlowFill.AcrossPlus.ts index 8fb73baad..914d1024e 100644 --- a/test/svm/SvmSpoke.SlowFill.AcrossPlus.ts +++ b/test/svm/SvmSpoke.SlowFill.AcrossPlus.ts @@ -27,8 +27,8 @@ import { readEventsUntilFound, calculateRelayEventHashUint8Array, slowFillHashFn, - loadRequestSlowFillParams, - loadExecuteSlowRelayLeafParams, + loadRequestV3SlowFillParams, + loadExecuteV3SlowRelayLeafParams, intToU8Array32, } from "../../src/svm"; import { MulticallHandler } from "../../target/types/multicall_handler"; @@ -139,17 +139,17 @@ describe("svm_spoke.slow_fill.across_plus", () => { const requestSlowFillValues: RequestV3SlowFillDataValues = [Array.from(relayHash), leaf.relayData]; let loadRequestParamsInstructions: TransactionInstruction[] = []; if (bufferParams) { - loadRequestParamsInstructions = await loadRequestSlowFillParams(program, relayer, requestSlowFillValues[1]); + loadRequestParamsInstructions = await loadRequestV3SlowFillParams(program, relayer, requestSlowFillValues[1]); [requestAccounts.instructionParams] = PublicKey.findProgramAddressSync( [Buffer.from("instruction_params"), relayer.publicKey.toBuffer()], program.programId ); } - const requestSlowFillParams: RequestV3SlowFillDataParams = bufferParams + const requestV3SlowFillParams: RequestV3SlowFillDataParams = bufferParams ? [requestSlowFillValues[0], null] : requestSlowFillValues; const requestIx = await program.methods - .requestSlowFill(...requestSlowFillParams) + .requestSlowFill(...requestV3SlowFillParams) .accounts(requestAccounts) .instruction(); @@ -177,7 +177,7 @@ describe("svm_spoke.slow_fill.across_plus", () => { ]; let loadExecuteParamsInstructions: TransactionInstruction[] = []; if (bufferParams) { - loadExecuteParamsInstructions = await loadExecuteSlowRelayLeafParams( + loadExecuteParamsInstructions = await loadExecuteV3SlowRelayLeafParams( program, relayer, executeSlowRelayLeafValues[1],