5

I dont want to deploy a program using cli or solana playground ide I want to deploy a program using clients packages of solana/web3.js, @project-serum/anchor, or any other packages

can anyone please help me with this.

1 Answer 1

4

A program on Solana is just an account whose data happens to be bytecode, and whose executable flag is set to true.

To deploy programs, the Solana CLI sends instructions to the System Program and the BPF Upgradeable Loader Program.

Here's an approach you can take:

  1. Study the implementation of the CLI to see how it uses the System Program to create the account that will become the program, and the BPF Upgradeable Loader Program to initialize, configure, and populate that account.
  2. Create a client using @solana/web3.js that creates and executes those same instructions in a series of transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.