Closed VladChernenko closed 1 month ago
Decided to ping all participants of discussion (@Gudahtt๐ฆ, @jpuri and @gauthierpetetin) to add correct labels and help the community. Because seems such problem is vaild not only for Metamask, but for other wallets too.
I decided to continue research and check compatibility of our core with other wallets extensions. For test I used:
The next strange thing I bumped with was the fact that:
pending
state โ This helps understand that RPC & EVM works correctly, so problems on the vendors' side ๐ค
So, after a while, after traffic monitoring I decided just compare (AGAIN) receipt structure, because noticed that extensions tries to query receipt again and again, but seems failed to parse it correctly.
So, EVM (package @ethereumjs/vm
) v6.4.2
produce the receipt like this:
Notice that the field
status
is integer here.
Then, I decided to check the docs and noticed that JSON-RPC examples shows that status
field is hex-encoded string.
Sources:
And images:
Quicknode:
Infura:
Your own docs:
On the other hand, Alchemy example shows that status is integer:
After I changed the type of status
manually (from 1
to 0x1
) - it started to works correctly โ
โ
โ
Note that here, the
status
in receipt (on the left) is hex string
status
format) have the same bugIgnore messages from @ahmar7
Describe the bug
GM, @Gudahtt and community ๐
Just checked issues #25693 and this one(#25655) in attempts to solve same issue
Intro
We have a sharded EVM in our project Klyntar and definitely wants Metamask compatibility๐ฆ๐ We've rewritten the whole JSON-RPC(required methods only) from a scratch and add JS version of EVM.
Seems everything good - balances resolved correctly, chainID and other stuff API works great.
But when I try to send transaction, the status is allways
pending
, but in reality it's successful and already executed in VM.As a proof(and mb it will be helpful) - I'll send the screen
Here you can see that the
status = 1
and tx body & receipt already in VM and state.What is strange here?
The strange here is that mobile Metamask version is fully compatible with our core - again proof please ๐
So, I have issues only with browser extensions
Troubleshooting
So, weaponizing the BurpSuite I started to monitor network connections and notify that:
1) Mobile version sends only
obvious
queries likeeth_estimateGas
,eth_blockNumber
,eth_sendRawTransaction
and so on 2) Browser extensions sends additionaleth_call
queries to VM via RPCE.g:
My node answer with
0x0
for such queries, because it's simpleaddress => address
tx, not a contract call.But, problem 2
When I've tried to test
public
network (Sepolia), Metamask sent onlyobvious
queries to Infura URL.Again, as I proof, I tracked the whole workflow - from building tx to green status of tx finalization:
Finally, I received the full interaction session with Sepolia URL and there were no
eth_call
messages at all ๐Expected behavior
Final
I've expected that the tx workflow should looks smth like this:
1) Build transaction 2) Send it 3) Metamask monitor for tx receipt 4) Once receipt received - check the status to green(in UI) and show to user
But, somewhy Metamask gives the permanent
Pending
status for normal tx ๐So, what to do with it? This issue is only for local networks? Or what? Should I downgrade Metamask version? Or wait for fix? Thank you in advance ๐
Screenshots/Recordings
Included in previous parts of template
Steps to reproduce
Extension
http://localhost
URLs)yellow
(Pending) togreen
(Success)eth_call
multiple times, resend transaction and failsMobile version
eth_call
calls and you'll get green status immediately(ofc, dependent on you project speed)Error messages or log output
Detection stage
In production (default)
Version
11.16.16
Build type
None
Browser
Chrome, Firefox
Operating system
Windows
Hardware wallet
No response
Additional context
No response
Severity
No response