daostack / daostack/arc

Refactor `method` in `GlobalConstraintInterface` to be an enum.

Open
#312 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
50
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Reading the code, I saw that the `_method` parameter in [here](https://github.com/daostack/arc/blob/master/contracts/globalConstraints/GlobalConstraintInterface.sol#L6) is always called with one of the following:

* `mintReputation`
* `mintTokens`
* `registerScheme`
* `unregisterScheme`
* `sendEther`
* `externalTokenTransfer`
* `externalTokenTransferFrom`
* `externalTokenIncreaseApproval`
* `externalTokenDecreaseApproval`
* `genericAction` - all other actions.

Can we refactor it to use an `enum` instead?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.