Skip to content

Revert reason is not returned while it shows on Alchemy dashboard #102

@laygir

Description

@laygir

Hello,

I'm trying to get the revert reason of a transaction on my frontend.
When using Alchemy I get the error on the screenshot and notice there is no revert reason.
But on the Alchemy dashboard, I can see the revert reason speed invalid as expected.

image

image

Here's the repo for a reproduction case, just add your api key and give it a shot.
https://github.com/laygir/web3-revert-test/tree/using-alchemy

Following contract is being used for this reproduction case.

contract CallRevert {
    uint256 speed;

    function Start(uint256 _speedPercent) public {
        require(_speedPercent <= 100, 'speed invalid');
        speed = _speedPercent;
    }
}

When deployed and a transaction sent locally againts Hardhat, here's the result.

image

*I've tried getting help on Discord but no luck, so creating an issue here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwont fixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions