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

Automatically turn ascii --salt into hex in deploy CLI #3254

Open
alvrs opened this issue Oct 4, 2024 · 8 comments
Open

Automatically turn ascii --salt into hex in deploy CLI #3254

alvrs opened this issue Oct 4, 2024 · 8 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@alvrs
Copy link
Member

alvrs commented Oct 4, 2024

The mud deploy CLI accepts a --salt param for deterministic deployments. For better UX we should automatically encode any string that doesn't start with 0x to hex. (Right now it throws with MUDError: Expected hex string for salt.)

@alvrs alvrs added the good first issue Good for newcomers label Oct 4, 2024
@AyushSagar99
Copy link

hi can i work on this?

@alvrs
Copy link
Member Author

alvrs commented Oct 4, 2024

for sure! do you need pointers to get started?

@AyushSagar99
Copy link

yes it would be great.

@alvrs
Copy link
Member Author

alvrs commented Oct 4, 2024

This is the place where the error is thrown:

const salt = opts.salt;
if (salt != null && !isHex(salt)) {
throw new MUDError("Expected hex string for salt");
}

Instead of throwing the error we can encode the string as hex and continue

@AyushSagar99
Copy link

thanks for the pointer after resolving i will ping you

@AyushSagar99
Copy link

AyushSagar99 commented Oct 5, 2024

i have made the changes should i raise a PR so you can review the changes i am trying to send message in discord please allow me to send message

@alvrs
Copy link
Member Author

alvrs commented Oct 5, 2024

yes, please open a PR with your changes

@AyushSagar99
Copy link

i have made the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants