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

Implement ecdsa_to_eth_address() and remove eth_compatibility crate #1233

Merged
merged 22 commits into from
May 13, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more fix
agryaznov committed May 11, 2022

Verified

This commit was signed with the committer’s verified signature.
erijo Erik Flodin
commit ce22fb09e29c2933d28bd633a1bc8c605083da11
4 changes: 2 additions & 2 deletions crates/env/src/api.rs
Original file line number Diff line number Diff line change
@@ -629,12 +629,12 @@ pub fn set_code_hash(code_hash: &[u8; 32]) -> Result<()> {
<EnvInstance as OnInstance>::on_instance(|instance| instance.set_code_hash(code_hash))
}

/// Returns the default Substrate's `AccountId` [u8;32] from the ECDSA compressed public key.
/// Returns the default Substrate's `AccountId` (`\[u8;32\]`) from the ECDSA compressed public key.
agryaznov marked this conversation as resolved.
Show resolved Hide resolved
/// It hashes the compressed public key with the `blake2b_256` algorithm like in substrate.
///
/// # Note
///
/// This function implies a standart `AccountId` type which is [u8;32].
/// This function implies a standart `AccountId` type which is `\[u8;32\]`.
agryaznov marked this conversation as resolved.
Show resolved Hide resolved
pub fn ecdsa_to_default_account_id(pubkey: &[u8; 33]) -> AccountId {
<EnvInstance as OnInstance>::on_instance(|instance| {
instance.ecdsa_to_default_account_id(pubkey)