In tests, call estimate gas, and any failures should add the function to a gaslimits.json file and use the generated gas costs to add to the file and checked into the irrigation-dapp repo.
This way we can load the gaslimits.json file into the front and and use some percentage like 20%.
Generate the gas costs from testing using https://www.npmjs.com/package/@mycrypto/gas-estimation
In tests, call estimate gas, and any failures should add the function to a gaslimits.json file and use the generated gas costs to add to the file and checked into the irrigation-dapp repo.
This way we can load the gaslimits.json file into the front and and use some percentage like 20%.
gasLimits.json
We then can load the gasLimits.json file into irrigation-dapp front end code and get rid of the Exceeds Gas Limit errors or unable to calculate gas.