fix: handle EIP-1967 proxy contracts in useGetABI for WalletConnect to dApps #5368
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There was a TODO in the code comments:
TODO: add additional proxy methods.
I happened to need support for this popular proxy method when trying to mint domains using the UnstoppableDomains dApp + web + KeepKey. I tested this out with KeepKey and it works as intended; the only blockers are what other users have reported with invalid hash value errors thrown from the dApp side when it receives our final, signedeth_sendTransaction
payload. You can tell from the screenshots below that the data we are sending them might need some tweaking, but that is an existing bug that I'm sure you all are aware of.Hope this helps! I mostly did this just for fun and KeepKey Desktop will eventually need this functionality too!
Pull Request Type
Issue (if applicable)
closes #5054
Risk
Zero immediate user impact, because the full user flow is still blocked by bug(s) that prevent the final tx being broadcasted. I have fully user-tested my changes with a KeepKey and it all works as expected.
Testing
Connect your wallet to the Unstoppable Domains dApp using WalletConnect. It is a proxy contract, and when you go through a flow like bridging a Polygon domain to Ethereum, it will be able to fetch the API from the logic contract and display the relevant ABI methods and data for you to confirm in the web3modal.
Engineering
See the testing notes above; the code changes are pretty self-explanatory and I left relevant comments too.
Operations
For example you could, mint a Polygon domain like .crypto using the UnstoppableDomains WalletConnect feature in web and then use the UnstoppableDomains UI to bridge that domain to Ethereum. Or just interacting with any dApp that has a EIP-1967 proxy as its root contract address.
Screenshots (if applicable)