I have a ReactJS project that can communicate with my smart contract. However, in my smart contract I have used the Require function to check for certain conditions before proceeding to execute down stream code. However, I do not know how to access the error messages in the event that certain conditions are not met.
For example:
bool public isRed = false;
require(isRed, "The state is not red");
How would I be able to access the "The state is not red" from the front end I am currently using Alchemy web3 to communicate with the blockchain?