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

Jorge Navarro
  • 61
  • 1
  • 3

1 Answers1

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)
goodvibration
  • 26,003
  • 5
  • 46
  • 86