Managing sFUEL Distribution
The default gas token of a SKALE Chain is SKALE Fuel (sFUEL). This gas token allows for a SKALE Chains to be fully Ethereum Virtual Machine (EVM) compatible while also offering zero gas fees to developers and end-users. While gasless transactions are recommended for most applications due to simple management; SKALE Chains running with sFUEL active will need to ensure developers and/or end-users can access the gas token to execute transactions.
Etherbase
Section titled “Etherbase”For SKALE Chain owners and operators, accessing sufficient sFUEL is critical. All SKALE Chains come predeployed with a smart contract called Etherbase which is important for two reasons:
-
A large allocation of sFUEL is stored in this contract upon creation of the SKALE Chain, ensuring sufficient quantities are available for operators
-
sFUEL when consuemd in a transaction is automatically recycled into Etherbase ensuring that a SKALE Chain doesn’t run out of gas
// Using Ethers v6import { Contract, JsonRpcProvider, Wallet, parseEther } from "ethers";
const ETHERBASE_ABI = [ "function partiallyRetrieve(address payable receiver, uint256 amount) external",];
const ETHERBASE_PREDEPLOYED_ADDRESS = "0xd2bA3e0000000000000000000000000000000000";
async function main() { const provider = new JsonRpcProvider("https://mainnet.skalenodes.com/v1/<schain-name>"); const wallet = new Wallet(process.env.PRIVATE_KEY, provider); const contract = new Contract(ETHERBASE_PREDEPLOYED_ADDRESS, ETHERBASE_ABI, wallet);
// Allow anyone to deploy const res = await contract.partiallyRetrieve(wallet.address, parseEther("25"));
console.log("Res: ", res); // Transaction Hash, once confirmed wallet.address native balance increases by 25}
main() .catch((err) => { console.error(err); process.exitCode = 1; });
sFUEL Station
Section titled “sFUEL Station”SKALE Chains can request being added to the sFUEL Station. The sFUEL Station is currently availalable on SKALE Hub testnet and mainnet Chains: Calypso, Europa, Nebula, and Titan. The sFUEL Station allows users to put in their wallet and attain a small allocation of sFUEL to get started on a particular sChain.