Hello we are using frontier, and we would like to remove gas fees for all evm transactons, I tried many things, but didn't achieve.. I still need to pass gas when I sign and send a transaction :

await web3.eth.accounts.signTransaction({
            data: ERC20_BYTECODES,
            gasPrice: 1,
            gas: 118196,
            value: 0,
        }, newAccountPrivateKey)

1 Answer 1


Try setting these in your runtime's lib.rs:

parameter_types! {
  pub DefaultBaseFeePerGas: U256 = U256::zero();
  pub DefaultElasticity: Permill = Permill::zero();

pub struct BaseFeeThreshold;

impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold {
  fn lower() -> Permill { Permill::zero() }
  fn ideal() -> Permill { Permill::zero() }
  fn upper() -> Permill { Permill::zero() }

Be aware that this can lead your chain to DoS attack.

  • I tried but, I still get an outOfGas error, thank you.
    – cibou
    Commented Jul 19, 2023 at 12:58
  • It seems that the eth_estimateGas is not returning the proper amount of gas needed, have you tried to build your frontier with cargo b -r --features=rpc-binary-search-estimate? A heads up that what I recommended here is an approach to not charge for a txn but the gas will still be there. Commented Jul 19, 2023 at 13:23
  • I dont have rpc-binary-search-estimate feature. I will check what eth_estimateGas return.
    – cibou
    Commented Jul 19, 2023 at 13:24
  • eth_estimateGas should return 0 ?
    – cibou
    Commented Jul 19, 2023 at 13:35
  • I forced eth_estimateGas to return 0, but I still have outOfGas error
    – cibou
    Commented Jul 19, 2023 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.