-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Typed Transactions #1364
Comments
The initial support for this has been added in 5.1.0. Currently AlchemyAPI and Pocket do not fully/properly support EIP-2930 transactions, and Etherscan has limited support for it. If you need typed transactions, please use INFURA (via the InfuraProvider is fine). As these services update their nodes and fix their configurations, I will turn them back on and push out newer versions of the 5.1 packages. Please try them out though, and let me know if there are any issues! Thanks! :) |
Minor feedback on this: transaction receipts for typed transactions have a |
More feedback (although this one is more opinionated): doing |
@fvictorio I’ll double check this in a week or so, but I don’t see the But this far there has been pretty wide-spread inconsistent behaviours between even the most popular services. I expect this to be resolved more quickly once Berlin is on mainnet. Obviously, that is not ideal, but for now I am keeping it off the TransactionReceipt object, so that all backends continue to match. I’ll add it once the popular third-party services agree again. Etherscan currently still incorrectly calculates estimateGas, but I’m trying to reach out to them to get that fixed. Once that is all straightened out, I’ll reiterate over all the services to make sure their output matches and contact the ones that don’t again. Berlin has been exhausting. :p |
I think I prefer to keep Whatever choice is made will continue on with EIP-1559. One motivating reason is the move to strictNullChecks in v6, so I can use things like |
Are there any docs on the right way to use these changes, specifically the |
Great point. I will add information to the docs today. |
I've been using ethers to test access list transactions and just passing it has worked fine: myContract.myFunction(arg1, arg2, {
accessList: [{
address: "0x...",
storageKeys: ["0x...", "0x...", ...]
}, { ... }, ...]
}) If you are using a node that supports const result = await network.provider.send("eth_createAccessList", { from, to, data, ... })
// result.accessList can be used as a parameter for ethers Not saying that docs are not needed, I'm just commenting in case anyone can't wait to use this 😅 |
Thanks for the info, looks simple enough @fvictorio. I was wondering if there would be helper methods like
(sample code only 😄 ) |
Docs have been update. I've added the field to the TransactionRequest (which accepts any AccessListish) and TransactionResponse (which will contain a normalized AccessList) as well as documented the accessListify method, which allows others to normalize AccessListish into an AccesList. I have experimented with Ideally, it is something that would preferably be handled within a Signer (with the option to explicitly override), using logic akin to: const [ untypedEstimate, typedEstimate ] = await Promise.all([
provider.estimateGas(untypedTx),
provider.estimateGas(typedTx),
]);
if (untypedEstimate.lt(typedEstimate)) {
this.sendTransaction(untypedTx);
} else {
this.sendTransaction(typedTx);
} But time will tell. :) |
Thanks for updating the docs @ricmoo 👍🏻 . I have also been playing around with Would be great to get that utility method in place for when it does. |
Closing this for now. Hopefully once createAccessList has more adoption we can re-address it… :) |
How it'd get widespread adoption if you decline to add support for it? |
What do you mean? Typed Transactions are supported. It’s eth_createAccessList that is not widely supported by most nodes I tried at the time. Most users of access lists do not need the RPC end-point, as they have specific slots and addresses known that need access (i.e. Proxy contracts which rely on the 2300 gas stipend). |
I've already completed most of the work on this, I'm just testing now, but am creating this issue for tracking purposes.
The related EIPs are:
This will need a change to the interface, but as all new properties are optional, this should not be too much of an issue.
The text was updated successfully, but these errors were encountered: