0

I have the below enums:

    // ENUMS
    enum StateType {
        ItemAvailable,
        OfferPlaced,
        Accepted
    }

And initialized the below variable State with type StateType:

    StateType State;

Finally, I have a getter to return the current state:

    function getState() view public returns (StateType) {
        return State;
    }

However after deploying the contract, Remix converts the return value of State to a uint8 instead of the expected State variable. How can I get a return value of ItemAvailable, OfferPlaced, or Accepted?

New contributor
aportno is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

aportno is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.