Skip to main content

Documentation Index

Fetch the complete documentation index at: https://seilabs-docs-evm-reference-and-sei-js-examples.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Gas and Fees

Sei supports both legacy and EIP-1559 transactions, but the fee model differs from Ethereum in three ways that affect how you estimate and set gas.

Legacy Gas Price Floor

Legacy transactions (type 0) on Sei must meet a minimum gas price set by on-chain governance. This floor can change via governance proposals — do not hard-code a specific value. Use eth_gasPrice to read the current minimum:
import { createPublicClient, http } from 'viem';
import { sei } from '@sei-js/precompiles/viem';

const client = createPublicClient({ chain: sei, transport: http() });
const gasPrice = await client.getGasPrice();

EIP-1559 Fee Model

Sei supports EIP-1559 transactions (type 2), but does not burn the base fee. Fees go entirely to validators rather than being partially burned as on Ethereum. This does not affect how you construct or send transactions — maxFeePerGas and maxPriorityFeePerGas work as expected. It is relevant only if your application models token supply or displays fee-burn information to users.
const fees = await client.estimateFeesPerGas();
// fees.maxFeePerGas and fees.maxPriorityFeePerGas are usable as-is

SSTORE Cost

The gas cost of SSTORE (writing to contract storage) is governance-adjustable on Sei. Do not hard-code storage write estimates in your application. Always use eth_estimateGas for any transaction that writes to storage:
const gas = await client.estimateGas({
  account,
  to: contractAddress,
  data: encodedCalldata,
});

// Add a buffer for governance changes during high-activity periods
const gasWithBuffer = (gas * 120n) / 100n; // 20% buffer

Summary

BehaviorEthereumSei
Legacy gas floorProtocol minimumGovernance-set, can change
Base feeBurnedPaid to validators
SSTORE costFixed by EIPGovernance-adjustable
estimateGasAlways correct to useRequired — do not hard-code storage costs