This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Error Reason #5677
Copy link
Copy link
Closed
Labels
1.x1.0 related issues1.0 related issues
Description
What's up?
Hi, in the function given below I am reverting with the message "Insufficient Balance." in React error object I am not getting error reason but on other hand in the ganache console error reason is showing, how will I get reason in react.
Examples/References
function registerJob(
string memory _jobName,
string memory _jobDescription,
uint256 _jobBudget
) external payable {
require(extraFund() + msg.value >= _jobBudget, "Insufficient Balance.");
uint32 timeNow = uint32(block.timestamp);
_jobIds++;
Job storage _job = _jobs[_jobIds];
_job.jobId = _jobIds;
_job.jobName = _jobName;
_job.jobDescription = _jobDescription;
_job.jobOwner = payable(msg.sender);
_job.jobWorker = payable(0x0);
_job.isCompleted = false;
_job.isJobValid = true;
_job.jobRegisteredDate = timeNow;
_job.jobStartedDate = 0;
_job.jobCompletedDate = 0;
_job.jobBudget = _jobBudget;
_job.jobSettledAmount = 0;
_liveJobs.add(_jobIds);
_fundByJobOwner[msg.sender] += msg.value;
_jobOwnerFundLocked[msg.sender] += _jobBudget;
emit JobRegistered(msg.sender, _jobBudget, _jobName, _jobIds);
}
}
Metadata
Metadata
Assignees
Labels
1.x1.0 related issues1.0 related issues

