StarkFiStarkFi

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 list

Displays 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-rpc

Returns the custom URL if set, otherwise default (Starkzap preset).


config set-network

Switches between mainnet and sepolia testnet.

starkfi config set-network <network>
ValueDescription
mainnetStarknet mainnet (default)
sepoliaStarknet testnet

Example:

starkfi config set-network mainnet
starkfi config set-network sepolia

config set-gasfree

Enables or disables Gasfree mode — the developer sponsors gas fees via Paymaster.

starkfi config set-gasfree <mode>
ValueDescription
onDeveloper sponsors gas — user pays nothing
offDisable 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>
ValueDescription
ETHPay gas in ETH
USDCPay gas in USDC
USDTPay gas in USDT
DAIPay gas in DAI
resetRevert to default (STRK)

Examples:

starkfi config set-gas-token USDC
starkfi config set-gas-token reset

Note: 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 reset

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

ModeHow it worksConfig command
GasfreeDeveloper pays all gas fees via Paymasterconfig set-gasfree on
GaslessUser pays gas in a chosen token (default: STRK) via Paymasterconfig set-gas-token <token>

Only one mode can be active at a time.

Edit on GitHub

Last updated on

On this page