diff --git a/web3.js/src/bpf-loader.js b/web3.js/src/bpf-loader.js index c92e2353a8..d4e72d525b 100644 --- a/web3.js/src/bpf-loader.js +++ b/web3.js/src/bpf-loader.js @@ -36,14 +36,22 @@ export class BpfLoader { * @param connection The connection to use * @param payer Account that will pay program loading fees * @param program Account to load the program into - * @param elfBytes The entire ELF containing the BPF program + * @param elf The entire ELF containing the BPF program + * @param version The version of the BPF loader to use */ static load( connection: Connection, payer: Account, program: Account, elf: Buffer | Uint8Array | Array, + version: number = 2, ): Promise { - return Loader.load(connection, payer, program, BpfLoader.programId(), elf); + return Loader.load( + connection, + payer, + program, + BpfLoader.programId(version), + elf, + ); } }