Skip to content

thewuhxyz/talent-olympics

Repository files navigation

Create Anchor dApp

This is a starter template generated from Create-Anchor-dApp monorepo CLI generator built by The Wuh.

Quickstart

Start by:

pnpm just run-validator
pnpm just deploy-all
pnpm just test marketplace

Not-So-Quick Start

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 the protocol/src/idl directory.

  • Run just copy-idl to do this automatically. just build and just deploy do this automatically. sidenote: just deploy also runs just build. you can run just 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 deploy marketplace-transfer-controller program first.

  • Common utility commands: just copy-idl, copys idl and types to the protocol/src/idl directory to be packaged

  • just build [program-name], same as anchor build -p [program-name], also runs just copy-idl

  • just deploy [program-name], same as anchor deploy -p [program-name], also runs just build &

  • just copy-idl.

  • just build-all and just deploy-all runs anchor build and anchor deploy respectively.

  • just test [script-name]. same as anchor run.

Context

  • Create a Service by creating a Token Group NFT, called service
  • All Token Group Members are service_tickets
  • ServiceAccount holds either service or service_ticket mints
  • Get all listings on the Marketplace by fetching all ServiceAccounts

Releases

No releases published

Packages

No packages published