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

Improve new KeyHelper interface #48

Closed
Sean-Tedrow-LB opened this issue Aug 24, 2022 · 0 comments · Fixed by #74
Closed

Improve new KeyHelper interface #48

Sean-Tedrow-LB opened this issue Aug 24, 2022 · 0 comments · Fixed by #74
Assignees
Labels
enhancement New feature or request Limechain Items for Limechain team
Milestone

Comments

@Sean-Tedrow-LB
Copy link

Problem

I'm under the impression that the KeyHelper.sol file defined here is going to be copied to this repo.

With that updated KeyHelper, creating a key looks like this: getSingleKey(0, 6, 1, bytes(""))

In this code snippet, those three numbers, 0, 6, and 1 are magic numbers, where 0 indicates that we want to set the admin key, 6 indicates that we also want to set the pause key, and 1 indicates that we want the account key that signed this execute transaction to be used for both.

When you read the code snippet getSingleKey(0, 6, 1, bytes("")) on its own, it's very difficult to read and understand

Solution

This interface would be greatly improved by providing constants for these magic numbers.

I'm hoping that this was always the plan and that I'm just being paranoid, but it seems like we're pretty close to release, so I just want to make sure that my concerns are documented.

Alternatives

No response

@Sean-Tedrow-LB Sean-Tedrow-LB added the enhancement New feature or request label Aug 24, 2022
@Nana-EC Nana-EC added the Limechain Items for Limechain team label Sep 26, 2022
@dimitrovmaksim dimitrovmaksim self-assigned this Sep 27, 2022
Repository owner moved this from In Progress to Done in Smart Contract Sprint Board Sep 30, 2022
@Nana-EC Nana-EC added this to the 0.2.0 milestone Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Limechain Items for Limechain team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants