From 3041541db51617bb1126aa7ea3fb518a341127ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Holm=20Gj=C3=B8rup?= Date: Thu, 24 Aug 2023 13:44:55 +0200 Subject: [PATCH] Fix the constant for the contract parameter max length --- packages/common/CHANGELOG.md | 5 +++++ packages/common/src/contractHelpers.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 1c5d6e357..7aee86f17 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### Fixes + +- The max smart contract parameter length was changed to 65535 bytes in protocol version 5 and onwards. + Functions which checks the parameter length will now reflect that. + ## 9.1.0 ### Added diff --git a/packages/common/src/contractHelpers.ts b/packages/common/src/contractHelpers.ts index 46ab71d90..7c14c52cb 100644 --- a/packages/common/src/contractHelpers.ts +++ b/packages/common/src/contractHelpers.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer/'; import { ContractAddress, InstanceInfo } from './types'; -const CONTRACT_PARAM_MAX_LENGTH = 1024; +const CONTRACT_PARAM_MAX_LENGTH = 65535; /** * Gets the contract name from an {@link InstanceInfo} object.