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

Feat: Change position of item of Action enum #104

Open
magj2006 opened this issue Sep 28, 2024 · 4 comments
Open

Feat: Change position of item of Action enum #104

magj2006 opened this issue Sep 28, 2024 · 4 comments
Assignees

Comments

@magj2006
Copy link
Contributor

Considering that the items in the Action enum may change, I propose moving Respond and AddToken to the front of the Action enum. The main reason for this proposal is that the Solana client, upon receiving messages from the ExocoreGateway, executes logic based on the action in the message. If there are changes to the items in the Action enum, it may affect the values of these two items, forcing the Solana client to update accordingly to accommodate such changes.

expect:
enum Action {
Respond,
REQUEST_ADD_WHITELIST_TOKEN,
...
}

@MaxMustermann2
Copy link
Collaborator

Is the idea that we fix the position of the enum items forever, with those two items in the front? Related: #26

@adu-web3
Copy link
Collaborator

I think the things that really matter is that we should agree on a stable version for Action and use github CI to check that existed actions can not be changed anymore and only appending new ones are allowed

@adu-web3
Copy link
Collaborator

enum Action {
    RESPOND,
    REQUEST_ADD_WHITELIST_TOKEN,
    REQUEST_DEPOSIT_LST,
    REQUEST_DEPOSIT_NST,
    REQUEST_WITHDRAW_LST,
    REQUEST_WITHDRAW_NST,
    REQUEST_SUBMIT_REWARD,
    REQUEST_CLAIM_REWARD,
    REQUEST_DELEGATE_TO,
    REQUEST_UNDELEGATE_FROM,
    REQUEST_DEPOSIT_THEN_DELEGATE_TO,
    REQUEST_MARK_BOOTSTRAP,
    REQUEST_ASSOCIATE_OPERATOR,
    REQUEST_DISSOCIATE_OPERATOR
}

this could be a possibly stable version for Action

@magj2006
Copy link
Contributor Author

enum Action {
    RESPOND,
    REQUEST_ADD_WHITELIST_TOKEN,
    REQUEST_DEPOSIT_LST,
    REQUEST_DEPOSIT_NST,
    REQUEST_WITHDRAW_LST,
    REQUEST_WITHDRAW_NST,
    REQUEST_SUBMIT_REWARD,
    REQUEST_CLAIM_REWARD,
    REQUEST_DELEGATE_TO,
    REQUEST_UNDELEGATE_FROM,
    REQUEST_DEPOSIT_THEN_DELEGATE_TO,
    REQUEST_MARK_BOOTSTRAP,
    REQUEST_ASSOCIATE_OPERATOR,
    REQUEST_DISSOCIATE_OPERATOR
}

this could be a possibly stable version for Action

Yeah, stable it like this. and we can only add new item, not allow to delete.

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