Skip to content

sui-foundation/satoshi-coin-flip-frontend-example

Repository files navigation

Satoshi Coin Flip Frontend Example

This is the React frontend example to interact with satoshi-coin-flip smart contract. You can check out the smart contract repository to understand how the game works which then help you to understand how to use the UI. This dApp was created using @mysten/create-dapp that sets up a simple React Client dApp using the following tools:

Disclaimer: This frontend acts as example to showcase how to interact with Sui Move smart contract using Typescript SDK @mysten/sui.js and React dApp kit @mysten/dapp-kit. It is not meant to be used for complete production-grade product

Prerequisites

Starting your dApp

To install dependencies you can run

pnpm install

To start your dApp in development mode run

pnpm dev

To let the frontend know which smart contract they need to interact with, you need to place the PACKAGE_ID and HOUSECAP_ID (collected from publish package step) into the constants.tsx

Building

To build your app for deployment you can run

pnpm build

UI Structure

The UI will have two tabs side by side:

  • Player tab includes all operations related to Player role
  • House tab includes all operations related to House role

Folder Structure

Due to the way the UI is structure:

  • React components related to Player tab reside in src/containers/Player
  • React components related to House tab reside in src/containers/House

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published