diff --git a/src/Contracts/Types/Str.php b/src/Contracts/Types/Str.php index 51cf974..6ef9e05 100644 --- a/src/Contracts/Types/Str.php +++ b/src/Contracts/Types/Str.php @@ -59,7 +59,7 @@ class Str extends SolidityType implements IType */ public function inputFormat($value, $name) { - $value = Utils::toHex($value); + $value = implode('', unpack('H*', $value)); $prefix = IntegerFormatter::format(mb_strlen($value) / 2); $l = floor((mb_strlen($value) + 63) / 64); $padding = (($l * 64 - mb_strlen($value) + 1) >= 0) ? $l * 64 - mb_strlen($value) : 0;