Skip to main content
An app can run in two environments. Live is the app your players use, paid in BCASH. Test is a second deployment of the same code, on the same Bankroll, paid in test cash: a token Bankroll mints without limit that is worth nothing anywhere. You try a change on test with no real money at risk, then publish it to live.

How a Bankroll-built app gets one

An app built with Bankroll has both versions from the start, in one repo. git push bankroll main builds the test version at the app’s test address; git push bankroll main:live publishes the tested commit as the live version. The Bankroll app’s builder does the same from a phone: every prompt builds the test version, and Publish in the test version’s menu moves live. bankroll wait test and bankroll wait live watch a build; bankroll faucet sends you test cash. Everything below is what Bankroll sets on the test deployment for you. A self-hosted app sets it itself.

One setting tells them apart

A test deployment carries one setting:
It is set on a test deployment and nowhere else. A deployment without the setting is live, as every deployment was before the setting existed, so nothing changes for an app that never heard of it. Everything else follows from the setting. On the server, appEnvironment() answers "test" or "live", and the money constants follow:
HSUSD_MINT is the mint cash settles in for this deployment. Charges, payouts, and checkCharge default to it, so the code you wrote for live runs on test unchanged; only the money differs. Name BCASH_MINT or TEST_CASH_MINT only when you mean one of them in particular.

The manifest says which it is

manifestRoute reads the setting and declares it:
A live manifest carries no environment claim, so a manifest signed before the claim existed signs to the same bytes it always did. When the Bankroll host opens a test deployment, the claim is what makes it charge in test cash, show test-cash balances, and offer test cash instead of a deposit when a player runs short.
A test deployment has its own address, its own data, and its own payment address. Test cash paid to it stays test cash; nothing moves between the two environments.

The mints

Both are SPL tokens on Solana mainnet, nine decimals, one token to the dollar. Test cash has no value and no market; it is minted by Bankroll on request and spent only inside test deployments.