Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Use enum to encode error reason in code #101

Open
JoeHowarth opened this issue Feb 21, 2023 · 0 comments
Open

Use enum to encode error reason in code #101

JoeHowarth opened this issue Feb 21, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JoeHowarth
Copy link
Contributor

In many places we return an error reason number when it's not clear whether we should revert or not immediately and need to pass the information for the failure up to calling code to do control flow.

Example: https://github.com/wormhole-foundation/trustless-generic-relayer/blob/main/ethereum/contracts/coreRelayer/CoreRelayer.sol#L157

These internal reason numbers should be turned into enums.

@JoeHowarth JoeHowarth added enhancement New feature or request good first issue Good for newcomers labels Feb 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant