This commit is contained in:
Pavel Rubin 2022-03-15 13:46:44 +01:00 committed by GitHub
commit 480da43f5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;