Config Commands
Manage RPC, network, gas mode, and gas token settings
Overview
The config command manages StarkFi CLI settings — RPC endpoint, network selection, and gas abstraction mode.
starkfi config <subcommand> [value]Subcommands
config list
Shows all current configuration settings.
starkfi config listDisplays RPC URL, network, gas mode, and any custom settings. Shows "No custom settings. Using defaults." if nothing has been configured.
config set-rpc
Sets a custom RPC endpoint for Starknet operations.
starkfi config set-rpc <url>Example:
starkfi config set-rpc https://starknet-mainnet.g.alchemy.com/v2/<key>Tip: Use a custom RPC if you're hitting rate limits on the default Starkzap endpoint.
config get-rpc
Shows the current RPC URL.
starkfi config get-rpcReturns the custom URL if set, otherwise default (Starkzap preset).
config set-network
Switches between mainnet and sepolia testnet.
starkfi config set-network <network>| Value | Description |
|---|---|
mainnet | Starknet mainnet (default) |
sepolia | Starknet testnet |
Example:
starkfi config set-network mainnet
starkfi config set-network sepoliaconfig set-gasfree
Enables or disables Gasfree mode — the developer sponsors gas fees via Paymaster.
starkfi config set-gasfree <mode>| Value | Description |
|---|---|
on | Developer sponsors gas — user pays nothing |
off | Disable gasfree, revert to default gas payment (STRK) |
Note: Gasfree and Gasless modes are mutually exclusive. Enabling gasfree clears any gas token setting.
config set-gas-token
Sets the token used for gas payment via Paymaster (Gasless mode).
starkfi config set-gas-token <token>| Value | Description |
|---|---|
ETH | Pay gas in ETH |
USDC | Pay gas in USDC |
USDT | Pay gas in USDT |
DAI | Pay gas in DAI |
reset | Revert to default (STRK) |
Examples:
starkfi config set-gas-token USDC
starkfi config set-gas-token resetNote: Setting a gas token clears gasfree mode. The two modes are mutually exclusive.
config reset
Resets all configuration settings to their defaults. Removes custom RPC URL, network, gas token, and gasfree mode settings.
starkfi config resetTip: Use this after testing or when you want a clean slate — no need to reset each setting individually.
Gas Abstraction Modes
StarkFi supports two gas abstraction modes:
| Mode | How it works | Config command |
|---|---|---|
| Gasfree | Developer pays all gas fees via Paymaster | config set-gasfree on |
| Gasless | User pays gas in a chosen token (default: STRK) via Paymaster | config set-gas-token <token> |
Only one mode can be active at a time.
Last updated on