-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: transaction types #68
Comments
I looked a bit into this, trying to find a way to detect support for EIP-1559 and EIP-4844 txs. EIP-1559My first attempt was to just make an What I ended up doing is sending an
which returns the gas price. If you send a call with that input data and a gas price of 0x1234567890, then the return data is 1234567890. But if you send a call with both Now, there are two things that make this a bit harder to use in practice:
EIP-4844For this, I think it's enough to make an But Arbitrum doesn't fail. Maybe this is just because they don't support EIP-4844 txs, but I'm not sure that's the case because the Pending workThe three mainnet transaction types not currently covered are pre-EIP155 legacy txs, post-EIP155 legacy txs and access list txs. The latter might be done with estimateGas and a clever use of the access list. But I'm not sure if there's a way to detect that EIP-155 is supported without actually sending a tx. |
Access lists are even easier than I thought: just use |
This is great, thank you! EIP-1559Could an alternative here be to use
What do you get instead? I also wonder how this will behave on arbitrum where 1559 is a bit different, as explained here: #60 (comment)
We could fetch the base fee beforehand and bump it by e.g. 50% if we want to avoid hardcoding a really big value. But hardcoding something huge is probably just as good and simpler. I've been wondering if most or all nodes support state overrides, which would be a way we can work around the insufficient balance issue EIP-4844Both Optimism and Arbitrum don't support blobs being posted to L2, see here for optimism and here for arbitrum. I wonder if we could also use OthersFor access lists, can we rely on |
How that would work? The gas price shouldn't affect the gas estimate in almost all cases.
You get the default gas price. Whatever that is, it's unlikely to be |
I was thinking it would error if you try estimating gas with unsupported fields, but I have not yet tested if that's the case or if they get ignored like with
Ah I see, that does make sense |
These were removed as part of #62 and should be added back. I'm not sure if there is a good way to automatically detect transaction types, so we may need to instead define a set of known transaction types, along with the test data for each (e.g. an RPC method name + associated input data)
The text was updated successfully, but these errors were encountered: