Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for enum in mapping with setVariable #145

Open
ltyu opened this issue Aug 2, 2022 · 2 comments
Open

Support for enum in mapping with setVariable #145

ltyu opened this issue Aug 2, 2022 · 2 comments

Comments

@ltyu
Copy link

ltyu commented Aug 2, 2022

Is your feature request related to a problem? Please describe.
I am unable to usemyMock.setVariable with enums. See example below:

enum ProposalState {
    VOTING,
    QUEUED,
    EXECUTED,
    FAILED
}

struct Proposal {
    uint256 id;
    ProposalState state;
}

mapping(uint => Proposal) public proposals;

When i try to run

await collectorDAO.setVariable("proposals", { 456 : { state: 1 }});

I get Error: unknown unsupported type inplace enum CollectorDAO.ProposalState

Describe the solution you'd like
Support for enum setting

@rungwe
Copy link

rungwe commented Nov 2, 2022

I am facing the same problem

@nknavkal
Copy link

nknavkal commented Nov 5, 2023

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants