flashbots / flashbots/ethers-provider-flashbots-bundle
UTF8 Replacement bytes "EFBFBD" in Revert error reason
- Dominant language
- TypeScript
- Stars
- 566
- Forks
- 211
- PR merge metrics
- No merged PRs in 30d
Description
Unable to decode the revert error from Simulation (and probably from real txs too).
What I've noticed when I decode the revert string to HEX, is that it contains a lot of "EFBFBD" bytes:

"EFBFBD" is used as a standard UTF8 replacement bytes if the source byte cannot be encoded into UTF8:
https://blog.gdssecurity.com/labs/2015/2/18/when-efbfbd-and-friends-come-knocking-observations-of-byte-a.html

As you can see it couldn't encode 9C.
If you replace EFBFBD with any random byte (like "FF") - then you have a proper length ABI-Encoded custom error (with 4 bytes in the beginning, and 32+32 bytes two uints after).
I'm not sure where this replacement happens - on the Ethers side (in fetchJson they use toUTF8 encoding) or on Flashbots Relay side.
But if it happens on Ether's side - maybe we can use another connector?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.