Documentation
Loading...
CLI

Faucet

Fund native tokens and mint ERC-20 tokens

Fund wallets inside a BuildBear sandbox — drop native tokens (ETH, MATIC, etc.) or mint ERC-20 tokens to any address.

[!NOTE] Faucet commands only work on live sandboxes. Run buildbear status first if you are unsure.


faucet native

Fund native tokens to a wallet address.

buildbear faucet native [rpcUrl] --address <walletAddress> [options]

Arguments:

ArgumentRequiredDescription
rpcUrlNoBuildBear RPC URL. If omitted, reads from .buildbear.json

Options:

FlagTypeDefaultRequiredDescription
--address <walletAddress>stringYesWallet address to receive funds
--amount <amountInEther>string1NoAmount in ether (e.g. 10, 0.5)
--jsonflagNoOutput as JSON
--quietflagNoSuppress output except errors

Examples:

# Fund 1 ETH (default) using .buildbear.json
buildbear faucet native --address 0xYourWalletAddress

# Fund 100 ETH to a specific address
buildbear faucet native --address 0xYourWalletAddress --amount 100

# Using an explicit RPC URL
buildbear faucet native https://rpc.buildbear.io/my-sandbox-id \
  --address 0xYourWalletAddress \
  --amount 10

# JSON output
buildbear faucet native --address 0xYourWalletAddress --amount 5 --json

Output:

✅ Sent 1 native tokens to 0xYourWalletAddress

JSON output:

{
  "result": null,
  "address": "0xYourWalletAddress",
  "amount": "1",
  "rpcUrl": "https://rpc.buildbear.io/my-sandbox-id"
}

faucet erc20

Mint ERC-20 tokens to a wallet address.

buildbear faucet erc20 [rpcUrl] --token <contractAddress> --address <walletAddress> [options]

Arguments:

ArgumentRequiredDescription
rpcUrlNoBuildBear RPC URL. If omitted, reads from .buildbear.json

Options:

FlagTypeDefaultRequiredDescription
--token <contractAddress>stringYesERC-20 token contract address
--address <walletAddress>stringYesWallet address to receive tokens
--amount <amount>string1000NoToken amount (in token units, not wei)
--jsonflagNoOutput as JSON
--quietflagNoSuppress output except errors

Examples:

# Mint 1000 USDC (default amount) to a wallet
buildbear faucet erc20 \
  --token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --address 0xYourWalletAddress

# Mint 50,000 USDC
buildbear faucet erc20 \
  --token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --address 0xYourWalletAddress \
  --amount 50000

# With explicit RPC URL and JSON output
buildbear faucet erc20 https://rpc.buildbear.io/my-sandbox-id \
  --token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
  --address 0xYourWalletAddress \
  --amount 1000 \
  --json

Output:

✅ Sent 1000 ERC-20 tokens (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) to 0xYourWalletAddress

JSON output:

{
  "result": null,
  "address": "0xYourWalletAddress",
  "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "amount": "1000",
  "rpcUrl": "https://rpc.buildbear.io/my-sandbox-id"
}

How it works

Both faucet commands use BuildBear custom RPC methods that bypass the normal blockchain rules inside a sandbox:

  • buildbear_nativeFaucet — directly sets the native balance of an address
  • buildbear_ERC20Faucet — mints ERC-20 tokens to an address without requiring the token owner's signature

These methods are only available on BuildBear sandboxes and will not work against public RPC endpoints.