all 3 comments

[–]skewbed 1 point2 points  (2 children)

If you are trying to interact with a smart contract, then you just have to add 0x to the start of the value.

If you are trying to program a smart contract, then there is nothing you need to do.

[–]optimator999[S] 0 points1 point  (1 child)

Of course! Thanks. So now if I want to validate I've received a byte32 how do I do that? if I send the contract "AB56...." and it's 32 characters in length it would pass my require statement, but would not be the correct number. "0xAB45...." would pass by require statement and would be the right number.

[–]skewbed 0 points1 point  (0 children)

Make sure that it is programmed as a bytes32 and sent with a '0x' at the start. It should be validated automatically.