The estimateGas call is not intercepted by the provider. This means that the provider estimates how much would the tx cost if sent outside the GSN. We need to intercept that call (if useGSN=true), rewrite it so it goes through the GSN, and then estimate its gas cost.
The issue is that the GSNRecipient behaves differently when called by rhub. They need to process msg.data to extract the actual sender, and this processing takes extra gas, which is not accounted for.
We need to:
Modify txData to place the sender at the end
Modify the from of the estimateGas to match the rhub
The estimateGas call is not intercepted by the provider. This means that the provider estimates how much would the tx cost if sent outside the GSN. We need to intercept that call (if
useGSN=true
), rewrite it so it goes through the GSN, and then estimate its gas cost.The issue is that the GSNRecipient behaves differently when called by rhub. They need to process msg.data to extract the actual sender, and this processing takes extra gas, which is not accounted for.
We need to: