Install nodejs
& npm
using the recommended method for your operating system. For many Linux distributions - including WSL2 on Windows - it's recommended to use nvm.
Next, install yarn
:
npm install -g yarn
Install rust
, cargo
, and many other required libraries:
curl https://sh.rustup.rs -sSf | sh
Note
This is for Linux & MacOS. For Windows, check out the original site.
sh -c "$(curl -sSfL https://release.solana.com/v1.10.25/install)"
Note
This is for Linux & MacOS. For Windows, check out the original site.
npm install -g @project-serum/anchor-cli
Ensure you have yarn
installed. Install the Metaplex CLI:
git clone https://github.com/metaplex-foundation/metaplex.git ~/metaplex
yarn install --cwd ~/metaplex/js/
Verify it was installed correctly:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts --version
anchor run test
OR
docker-compose up
anchor build
anchor deploy
OR
docker-compose run program "anchor build && anchor deploy"
If you're using the Solana Playground IDE, you can import your Solana program's IDL by building it, selecting Extra -> IDL
from the drop-down, clicking Export
, then dropping your json file in the solpg
folder.
Then just un-comment the necessary code in either api/src/service.ts
or tests/nft-marketplace.ts
.