Skip to content

ajuna-network/herojam-ui

Repository files navigation

Ajuna CasinoJam Frontend

This is the react / next.js frontend for CasinoJAM SAGE playground. If you are looking for the node implementation, go here.

Getting Started

Generate Papi Types

This repo uses papi to connect to substrate nodes. In order to generate the typescript types with papi, you must first run the following commands, see

pnpm papi add casinojam -w wss://rpc-paseo.ajuna.network

or if you are running a substrate node locally

pnpm papi add casinojam -w ws://127.0.0.1:9944

This will generate the types for connecting papi to ajuna with the key casinojam

[!IMPORTANT] If your node specifications change, you will have to rerun the command.

Running the dev server

pnpm install
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Working with dev accounts

If you are running your node with the --dev flag, you will have access to demo accounts. You can add alices, bobs, ... accounts to your wallets with the following mnemonics

# alice
bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice

# bob
bottom drive obey lake curtain smoke basket hold race lonely fit walk//Bob

Adding new commands

All commands the cli accepts are in the /commands folder. Add a new command by

  1. Creating a new file, e.g. /commands/new-command.ts.
  2. Returning a function that exends the Command type
  3. Add the exported Command to the commands array in /commands/index.ts it is used to tell the terminal what commands are available and what to do when called.

In the command's execute function you will have access to CommandContext which includes the active api, client, signer, selected account. Take a look at existing commands to see how to use the context variables.

Learn More

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published