I have a contract with a function that takes as parameter a bytes32
, and a mapping that uses a bytes32
as key.
In geth, it seems like I can call contract.foo("0x123abc")
and contract.foo(0x123abc)
, but I'm not sure they give the same results.
Same for contract.mymap("0x123abc")
and contract.mymap(0x123abc)
, are they the same ? Are they always processed as 0x123abc0000000000000000000000000000000000000000000000000000000000
? Bytes are similar to strings but I'm not sure of the difference.
I can't test anything I want on my contract, but I checked and both map(0x1234567890abcdef123)
and map("0x1234567890abcdef123")
work but give different results. Which one should I use ?