This is a starter template generated from Create-Anchor-dApp monorepo CLI generator built by The Wuh.
Start by:
pnpm just run-validator
pnpm just deploy-all
pnpm just test marketplace
The scripts are there to aid development.
just [command]
is should be the same as pnpm program:[command]
, most of the time. Check the justfile
and root package.json
to see more. I will be using just [command]
for rest of the doc.
- Not every Token extension works on localnet. So we have to build from source. The binary is already included at
/spl/spl_token_2022.so
. You can run:
just run-validator
which is basically just,
solana-test-validator --reset --bpf-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ./spl/spl_token_2022.so
- Ran into compilation issues relating to this [issue](issue link). Copied this fix that seemed to work.
cargo update -p [email protected] --precise 1.18.17
can run:
just update-deps
if you run into the same issues.
-
All Tests are run in the
protocol/tests
directory. it does, however, require that you copy idls to theprotocol/src/idl
directory. -
Run
just copy-idl
to do this automatically.just build
andjust deploy
do this automatically. sidenote:just deploy
also runsjust build
. you can runjust deploy
if you want to build and deploy -
The Rust challenge are in
rust/track-r5
.marketplace
is the entrypoint.marketplace-transfer-controller
is the transfer hook program. You probably want to build and deploymarketplace-transfer-controller
program first. -
Common utility commands:
just copy-idl
, copys idl and types to theprotocol/src/idl
directory to be packaged -
just build [program-name]
, same asanchor build -p [program-name]
, also runsjust copy-idl
-
just deploy [program-name]
, same asanchor deploy -p [program-name]
, also runsjust build
& -
just copy-idl
. -
just build-all
andjust deploy-all
runsanchor build
andanchor deploy
respectively. -
just test [script-name]
. same asanchor run
.
- Create a Service by creating a Token Group NFT, called
service
- All Token Group Members are
service_ticket
s ServiceAccount
holds eitherservice
orservice_ticket
mints- Get all listings on the Marketplace by fetching all
ServiceAccount
s