-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: Change hash encoding, support passing in code
without borsh
#152
Conversation
@r-near can you please bump the rust in seperate PR, because probably this PR will be cherry picked |
code
without borsh
Closes #150 |
.try_into() | ||
.expect("Code should be converted to CryptoHash") | ||
/// Converts code to a base58-encoded CryptoHash string. | ||
fn convert_code_to_crypto_hash(code: &[u8]) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not crypto_hash; right now, we are returning CryptoHash. It's not very important, but maybe we could rename it to convert_code_to_bs58_encoded_hash or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @r-near
up_staged_code_hash()
return type fromOption<CryptoHash>
toOption<String>
and updates all hash generation/comparison code accordinglycode
directly instead of with BorshCloses #150