Unlimited Faucet
TestNets come with an unlimited faucet which you can use to fund or set an arbitrary amount of native and ERC-20 tokens to any account. Since there is no mining of tokens, funds will be instantly added to the account and available for you to use.
Accounts can be funded from the Dashboard or using custom JSON-RPC methods.
Dashboard unlimited faucet
From the TestNet dashboard, go to Faucet.
- Paste an address or addresses (1 address per line)
- Enter the desired amount in the nominal currency (not WEI)
- Pick the currency. It can be one of:
- Network’s native token
- An existing ERC-20 token
- Select use custom token address and paste the token’s address
- Click Fund.
RPC unlimited faucet
You must use the Admin RPC URL to get access to the following RPC methods for manipulating account balances:
tenderly_addBalance
: Adds the balance to the provided account or accounts.tenderly_setBalance
: Modifies the balance of an account or accounts.tenderly_setErc20Balance
: Sets the token balance for the wallet on the provided erc20 contract.
Fund ERC-20 balance
To fund DAI tokens (0x6B175474E89094C44Da98b954EedeAC495271d0F
) to accounts ["0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e", "0xBd8DaA414Fda8a8A129F7035e7496759C5aF8570"]
with the value of 0xDE0B6B3A7640000
, run the following script that uses tenderly_setErc20Balance
.
curl $TENDERLY_VIRTUAL_TESTNET_RPC \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tenderly_setErc20Balance",
"params": [
"0x6B175474E89094C44Da98b954EedeAC495271d0F",
[
"0x40BdB4497614bAe1A67061EE20AAdE3c2067AC9e",
"0xBd8DaA414Fda8a8A129F7035e7496759C5aF8570"
],
"0xDE0B6B3A7640000"
],
"id": "1234"
}'
Fund native balance
You can fund the account 0xE58b9ee93700A616b50509C8292977FA7a0f8ce1
to value of 0xDE0B6B3A7640000
by running the following script that uses tenderly_setBalance
.
curl $TENDERLY_VIRTUAL_TESTNET_RPC \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tenderly_setBalance",
"params": [
[
"0xE58b9ee93700A616b50509C8292977FA7a0f8ce1",
"0xBd8DaA414Fda8a8A129F7035e7496759C5aF8570"
],
"0xDE0B6B3A7640000"
],
"id": "1234"
}'