Wouldn’t it make sense to decouple this entirely from a given transaction? If you want to include a transaction in a given number of blocks, and assume that the next n blocks will look roughly the same as the last n blocks, then you should be able to provide (gas, n)
to an RPC method and receive gas price
in return. It would then be up to the wallet to provide this to the user, worry about if it fell within the acceptable bounds the user has specified, etc.
1 Like