HappyChain is a blockchain focused on fully onchain gaming.
Our flagship feature is the Happy Account, a global account for all applications on HappyChain, implemented via a wallet that can be permissionlessly embedded into any app.
The Happy Account enables secure asset self-custody and transaction signing via Boop (an EIP-4337 alternative) smart account controlled by private key, either derived from a social account (Google, Twitter, Discord, ...) + seamless 2FA, or via a traditional wallet extension (Metamask, Rabby, etc).
-
Install pre-requisite tooling:
- Make
- Foundry
- Bun 1.2.4
- Node.js 23.9+
- We recommend using nvm to manage Node.js versions.
-
Run
make setup
You can run make help
to get a short description of the most common commands.
make setup
— don't forget to run this before anything else, or when dependencies change!make build
— builds all packagesmake docs
— build and serves the documentation on http://localhost:4173.- This is different from architecture docs, which are in /docs.
make check
— runs code quality & formatting checksmake format
— formats code and tries to fix code quality issuesmake clean
— removes all build artifactsmake nuke
— removes all build artifacts and dependencies
Most packages have a version of make build
, make clean
, make check
and make format
.
-
make {sdk,iframe,account,demos,ts,docs,contracts}.{build,clean,check,format}
- This runs the specified command (after the dot) in a subset of the packages.
sdk
: all packages needed to build the sdkiframe
: all packages needed to build the iframeaccount
: sdk + iframedemos
: all demo packages (no dependencies)ts
: all typescript packages (excluding docs)docs
: the documentation sitecontracts
: the smart contracts
-
make {sdk,iframe,demo-js,demo-react,demo-vue,docs}.dev
- This builds, rebuilds on changes, and runs development servers (where applicable) for a subset of packages.
sdk
: all packages needed to build the sdkiframe
: all packages needed to build the iframedemo-js
: everything needed for the vanilla JS demo (account + demo-vanillajs)demo-react
: everything needed for the React demo (account + demo-react)demo-vue
: everything needed for the Vue demo (account + demo-wagmi-vue)- The
demo-*
targets will let you access the demo on your browser (look for the URL in the terminal)
-
make {demo-js,demo-react,demo-vue}.build
- Builds the production version of the specified demo locally.
-
make {demo-js,demo-react,demo-vue}.prod
- Builds & run the production version of the specified demo locally.
By default concurrently
is used to run multiple processes at once. If preferred, you can install mprocs
globally on your system and set the env variable MULTIRUN=mprocs
to use this instead.
See the Makefile for descriptions of all top-level make commands.