Gas & Fees
Gas is native SOSO (18 decimals), not ETH. Native SOSO has no ERC-20 address. WSOSO and other ERC-20 balances cannot pay gas. A native SOSO balance is required to submit a transaction yourself. For sponsored submission, see Relayer.
Fee model
EIP-1559 is enabled. The base fee and the priority fee both go to the block builder; the base fee is not burned. Legacy, access-list, and EIP-1559 transactions (types 0–2) are accepted; type-3 blob transactions are not. See Differences from Ethereum.
For type-2 transactions, maxFeePerGas caps the total price per gas and maxPriorityFeePerGas caps the tip. These are limits, not a fixed charge:
effectiveGasPrice = min(maxFeePerGas, baseFeePerGas + maxPriorityFeePerGas)maxFeePerGas must be at least the current baseFeePerGas, or the node rejects the transaction. Type-0 transactions use gasPrice instead of the two EIP-1559 fields.
The gas limit caps execution gas. The receipt records gasUsed and effectiveGasPrice.
Quote a price
Prices are wei per gas, not a total fee. Read the current base fee from the latest block (or eth_feeHistory) and a suggested tip from eth_maxPriorityFeePerGas:
curl -sS https://mainnet.valuechain.xyz \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'
curl -sS https://mainnet.valuechain.xyz \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_maxPriorityFeePerGas","params":[]}'Use the block's baseFeePerGas with the suggested tip to set maxFeePerGas and maxPriorityFeePerGas. eth_gasPrice returns a single suggested price per gas (typically about base fee plus tip) for type-0 gasPrice or as a rough cap.
Recent mainnet suggestions have been on the order of 0xf4240 wei (base / tip) and 0x1e8480 wei (eth_gasPrice). Read the RPCs; do not hardcode these values.
Estimate execution gas
Call eth_estimateGas with the same from, to, value, and data that will be submitted. The result is a gas quantity, not an amount of SOSO. value is a hex amount in wei (0x0 for a plain call with no value):
Check for a JSON-RPC error before using the result. An estimate reflects the current state; a later transaction can still fail if balances, allowances, or contract state change.
Calculate the execution fee
Use the mined receipt's gasUsed and effectiveGasPrice:
For example, 21,000 gas at 2,000,000 wei per gas (0x1e8480) costs 42,000,000,000 wei (0.000000042 SOSO). That price is the same order of magnitude as a recent eth_gasPrice, not a quote. Use integer arithmetic. An included transaction that reverts still consumes gas.
Sponsored transactions
For sponsored contract calls, see Relayer. Gas sponsorship does not supply the application tokens or approvals required by the contract call.
Last updated