A simple Bitcoin Cash (BCH) faucet built using CashScript for smart contract-powered transactions.
-
Create a FaucetContract in Django admin
- Go to
Admin › Home › Main › Faucet contracts › Add faucet contract - Select the network
- The following fields must be a unique set for the smart contracts parameters:
- Set a passcode (around 10 characters long)
- Set the payout amount in satoshis
- Set an owner address. This is for sweeping the faucet contract's funds
- Set the max claim count limit
- Go to
-
Fund the contract
- Send BCH to the contract.
- You can send exact amount based on
max claim countandpayout satoshisset for the contract.claim_tx_fee_sats = 300 sats_to_send = (payout_satoshis + claim_tx_fee_sats) * max_claim_count bch_to_send = sats_to_send / 10 ** 8
-
Test claiming
- Go to
/claimpage - Input receipient address, passcode, and select network. Must be a cashaddress with the appropirate network selected
- Claiming is limited per IP address. There is a 24 hour cooldown to allow claiming again from the same IP address.
- Go to
-
Sweep remaining funds from contract
- Go to
Admin › Home › Main › Faucet contracts › Faucet detailsand pressSWEEPbutton besideHISTORYbutton - Input recipient & wif
- Submit form
- Go to