Gas and Fees
Gas pricing
Specter uses GHOST as the gas token. The chain enforces a minimum gas price of 1 gwei (1,000,000,000 aghost).
warning
eth_gasPrice may return 0 on Specter. This is a known Cosmos EVM behavior. Always set gas price explicitly to avoid transaction failures.
Setting gas price
// viem
const hash = await walletClient.sendTransaction({
to: recipient,
value: parseEther('1'),
gasPrice: 1_000_000_000n,
});
// ethers.js v6
const tx = await contract.myFunction({
gasPrice: 1_000_000_000n,
});
# Foundry
cast send $CONTRACT "myFunction()" \
--gas-price 1000000000 \
--rpc-url https://testnet.specterchain.com
Typical gas costs
| Operation | Approximate Gas |
|---|---|
| Simple transfer | ~21,000 |
| ERC20 transfer | ~65,000 |
| Contract deployment (small) | ~200,000 |
| Ghost Protocol commit | ~150,000 |
| Ghost Protocol reveal | ~350,000 |
| Groth16 proof verification | ~200,000 |
| GhostERC20 deployment | ~2,000,000 |
Cost calculation
Cost (in GHOST) = gasUsed × gasPrice / 10^18
Example: Reveal operation
= 350,000 × 1,000,000,000 / 10^18
= 0.00035 GHOST
At 1 gwei gas price, most operations cost fractions of a cent worth of GHOST.