1

I have a H256 value which is an extrinsic returned hash

0x8d19a2e575d583b8812418c71be304f16a978cfac2bfad54afcad824cb4d3471

but when i convert this to String using .to_string()

it does not return complete string

0x8d19…3471

1 Answer 1

3

To convert it to string we can use format macro instead

let tx_hash = format!("{:?}", h256_object);

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.