How can I convert a string
to a bytes32
? Does anyone has a magic function or library which does it?
For example: This works since as input I gave 32-bits. But it won't work with "> 32-bit" chars.
set_txn_hash = a.transact().set("QmVoGzRDscx61k3RHHkLYaMFtxYZi3ps");#32-bit char
-
function get() returns (stringc value){
return list.get_head_data();
}
But if I need to give more character for example contains 48-bit string this won't work. [Q] How could I make this work?