From 184bc53f9db17c734aeb09dc0834c0fb7b67ffc1 Mon Sep 17 00:00:00 2001 From: Roberts Siminidi Date: Tue, 10 Jul 2018 14:11:31 +0300 Subject: [PATCH] There is an issue with this check now because the "?" Symbol was removed, as a result of this preg_match does not match for 'bytes'. The correct version should be: "return (preg_match('/^bytes([0-9]{1,})?([([0-9])])$/', $name) === 1);" --- src/Contracts/Types/Bytes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Contracts/Types/Bytes.php b/src/Contracts/Types/Bytes.php index 542ba74..73b22f7 100644 --- a/src/Contracts/Types/Bytes.php +++ b/src/Contracts/Types/Bytes.php @@ -36,7 +36,7 @@ class Bytes extends SolidityType implements IType */ public function isType($name) { - return (preg_match('/^bytes([0-9]{1,})(\[([0-9]*)\])*$/', $name) === 1); + return (preg_match('/^bytes([0-9]{1,})?(\[([0-9]*)\])*$/', $name) === 1); } /**