2

I am trying to learn about solidity so I just watch a tutorial about it, I already copy the same code as the tutorial but there is an error with bytes32. Here it is: enter image description here

That is the deploy code: enter image description here

And that is the .sol: enter image description here

4

Replace ['Sat', 'Vit'] with:

  • ['Sat', 'Vit'].map(x => web3.fromAscii(x)) if you're on Truffle 4.x (web3 0.x)
  • ['Sat', 'Vit'].map(x => web3.utils.asciiToHex(x)) if you're on Truffle 5.x (web3 1.x)
| improve this answer | |

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