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: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:
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.