Getting Started

For a deep look, you might navigate to Usage section.

Quick start

npx soprox -n my-app
cd my-app

A template will be generated. In the current template, you can instantly build, deploy, and interact with the programs. However, you need an account with SOL to pay the transaction fee. Fortunately, SoproX can support you to create a payer account.

A new account with 10 will be created in devnet. Do not reuse the example account below to store your SOL in mainnet.

npx soprox --payer

You will see logs printed out,

Connection to cluster established: { 'solana-core': '1.6.8', 'feature-set': 3458834192 }
Current balance of D9QcD94LhSp5FhSgQNRpjL8q9qH1cfgCfbh9R4RhGc3c is 10 SOL
A new payer is created. Details:
Address: D9QcD94LhSp5FhSgQNRpjL8q9qH1cfgCfbh9R4RhGc3c
Public key: b47395094a278fa7f6f5ba63f81da754925ad2c2db54477faea8f2503aaad51b
Secret key: 4b900b96d2f11f906edf9d9486194b8d9cfa85df3f520f76a4956fe18ca37b6fb47395094a278fa7f6f5ba63f81da754925ad2c2db54477faea8f2503aaad51b

Add the information to soprox.config.js like this.

"nodeUrl": "",
"payer": "4b900b96d2f11f906edf9d9486194b8d9cfa85df3f520f76a4956fe18ca37b6fb47395094a278fa7f6f5ba63f81da754925ad2c2db54477faea8f2503aaad51b"

Next, build your SRP and deploy it,

npm run build
npm run deploy
npm start

Your terminal should show something like

*** Calling to program: CZyfxNGQs46Si8QGWTsj5KU64HXXyT1TPCgwWUco4LcB
*** Payer: 5vHjWRc2hys4XwZkMktg35N8oALt5d1ZXYkwCXXX3JHm
Hello data before a change: { times: 0 }
Change hello data (txId): 4NVbvBcUPSgRdTiR2SzPqFy6pB4oxsdkcyq7Niijzg8ZdRoYrioYYELFaGvE8MYHVhgzkA8HAhc94oq3xVxZAVNF
Hello data after a change: { times: 1 }

โ€‹๐Ÿ™Œ Hooray! You did it well.