Based on https://github.com/paritytech/frontier/pull/1039. As a follow up of https://github.com/humanode-network/humanode/pull/848#pullrequestreview-1808987031.