Can we pass string values to the contract which holds bytes 32 only?

0 votes
My contract can hold only array of type bytes32 only. How can we store string values as well.
Aug 26 in Blockchain by anonymous
• 120 points
67 views

1 answer to this question.

0 votes

A string is not byte32 and so you can not store a string in a byte32. The main reason is that a string is dynamic. But storing a string in bytes is possible.

answered Aug 26 by Rina

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer
+16 votes
4 answers
+1 vote
1 answer

I would like to create a blockchain network which will stay at the same level of complexity, is it possible?

You can very easily create a cryptocurrency having a ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
63 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
173 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,660 points
107 views
+1 vote
4 answers
+1 vote
2 answers

How can I traverse the blocks of transactions in hyperledger fabric?

For hyperledger fabric you can use query ...READ MORE

answered May 8, 2018 in Blockchain by Rachel
2,041 views