byte32 = 32 bytes = 64 hex
0x{64までいける!}
bytes
: dynamic sized byte sequence.string
: dynamic sized unicode string assumed to be UTF-8 encoded.<type>[]
: a variable-length array of elements of the given type.As a rule of thumb, use
bytes
for arbitrary-length raw byte datastring
for arbitrary-length string (UTF-8) data.
If you can limit the length to a certain number of bytes, always use one of bytes1
to bytes32
because they are much cheaper.
Why do Solidity examples use bytes32 type instead of string?
string >> dynamic
byte32 >> can understand maximam