Hi guys,
I’ve got several enums in solidity :
enum WorkflowStatus {
RegisteringVoters,
ProposalsRegistrationStarted,
ProposalsRegistrationEnded,
VotingSessionStarted,
VotingSessionEnded,
VotesTallied
}
In my front, I can click on a button which gonna call my function :
function startProposalsRegistering() external onlyOwner {
require(workflowStatus == WorkflowStatus.RegisteringVoters, 'Registering proposals cant be started now');
workflowStatus = WorkflowStatus.ProposalsRegistrationStarted;
emit WorkflowStatusChange(WorkflowStatus.RegisteringVoters, WorkflowStatus.ProposalsRegistrationStarted);
}
As you can see the workFlow change when I call this function. I would like to create an other button which gonna display the current workFlow, How can I do that with Moralis ?