hexEncode is a helper function to encode bytes to hex in templates. It adds the "0x" prefix to ensure the output is processed as hex data and not misinterpreted as an integer.
(data []byte)
| 189 | // It adds the "0x" prefix to ensure the output is processed as hex data |
| 190 | // and not misinterpreted as an integer. |
| 191 | func hexEncode(data []byte) string { |
| 192 | return "0x" + hex.EncodeToString(data) |
| 193 | } |
| 194 | |
| 195 | // hexStr is a helper function to encode bytes to a raw hex string in templates |
| 196 | // without the "0x" prefix. |
no outgoing calls
searching dependent graphs…