3

Trying to add an ed25519 address to the chain_spec file. The node_template has the defaults

vec![get_account_id_from_seed::<sr25519::Public>("Alice"),

We would like to add a custom address and we are using ed25519 and we can't seem to get it to work.

1 Answer 1

2

https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex_n_into_unchecked.html https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex2array_unchecked.html

https://github.com/paritytech/substrate/blob/50de15d8740a129db9c18a6698fbd183b00326a2/bin/node/cli/src/chain_spec.rs#L90-L176

let alice_hex_public_key = "..";
let alice: AccountId = array_bytes::hex_n_into_unchecked(alice_hex_public);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.