Skip to content

Helper backend service to improve UX for Secret Janken Game

License

Notifications You must be signed in to change notification settings

EG-easy/secret-janken-api

Repository files navigation

Secret-Janken-API

Helper backend service to improve UX for Secret Janken Game. secret-janken-front interacts with secret-janken-contract and stores its information to RDB through secret-janken-api.

System Architecture

  • secret-janken-api reserves metadata of SNIP721
  • secret-janken-api synchronizes the status of offers retrieved from the contract
  • secret-janken-api watches the contract and rewrites the DB values in case of any changes in the owner of SNIP721

Interact with CLI (Optional useful tools for development)

  • deploy contract
node cmd/cmd.js deploy snip721
node cmd/cmd.js deploy janken
  • mint SNIP721 token
node cmd/cmd.js tx mint_nft
  • make offer
node cmd/cmd.js tx make_offer
  • accept offer
node cmd/cmd.js tx accept_offer
  • decline offer
node cmd/cmd.js tx decline_offer
  • bet tokens
node cmd/cmd.js tx bet_token

reference