-
Notifications
You must be signed in to change notification settings - Fork 17
Adopt sendTransaction Logic From Client Library #206
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
Comments
I don't understand how it is related to the migration repo. Transaction replacement can be done through Metamask and adding it to an automated script like we have is problematic. |
@ben-kaufman can you describe what you mean by "transaction replacement can be done through Metamask"? Yes Metamask currently supports "speeding up transactions", or replacing your prior one with one of higher gas cost/limit, but dApps need to support this on their end since the txHash the dApp is waiting on will change. Here's an article talking about this.
I think the migration script should use this const block = await web3.eth.getBlock("latest");
const opts = {
from: web3.eth.defaultAccount,
gas: block.gasLimit - 100000
}; @orenyodfat in my opinion I would rename this issue to "Adopt |
@dOrgJelli I couldn't find there the exact part which supports transaction replacement. As far as I understand, the script needs to know if a replacement transaction was sent and then accordingly switch to use it instead, but I don't see such logic in the client library. Can you please point me to where it is implemented there? |
Edit: see comment below.
|
@orenyodfat @ben-kaufman @jellegerbrandy @tspoff I'm so sorry for misleading you all, but after running some tests it turns out this code actually fails to keep track of sped-up transactions. It isn't easy to spot this from within Alchemy because it updates its state from the subgraph, and not from the pending transaction. Looking into how you keep track of sped up transactions now. |
I've posted a potential solution to this here: |
this is needed for https://github.com/dOrgTech/DAOcreator
The text was updated successfully, but these errors were encountered: