From 868b518639f9450348c2ecce7b3fcc69653b88aa Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 7 Aug 2026 05:39:20 +0000 Subject: [PATCH 1/2] widen user-defined type name limit to 256 --- Stellar-contract-spec.x | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Stellar-contract-spec.x b/Stellar-contract-spec.x index 33c4cec..9e93f19 100644 --- a/Stellar-contract-spec.x +++ b/Stellar-contract-spec.x @@ -12,6 +12,12 @@ namespace stellar const SC_SPEC_DOC_LIMIT = 1024; +// The limit on the name of a user-defined type, and on a reference to one. It +// is longer than the limit on the names within a type, such as its fields or +// cases, because a type's name qualifies it: it is the name of the module or +// namespace the type is defined in, then the type's own name. +const SC_SPEC_TYPE_NAME_LIMIT = 256; + enum SCSpecType { SC_SPEC_TYPE_VAL = 0, @@ -82,7 +88,7 @@ struct SCSpecTypeBytesN struct SCSpecTypeUDT { - string name<60>; + string name; }; union SCSpecTypeDef switch (SCSpecType type) @@ -134,7 +140,7 @@ struct SCSpecUDTStructV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTStructFieldV0 fields<>; }; @@ -169,7 +175,7 @@ struct SCSpecUDTUnionV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTUnionCaseV0 cases<>; }; @@ -184,7 +190,7 @@ struct SCSpecUDTEnumV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTEnumCaseV0 cases<>; }; @@ -199,7 +205,7 @@ struct SCSpecUDTErrorEnumV0 { string doc; string lib<80>; - string name<60>; + string name; SCSpecUDTErrorEnumCaseV0 cases<>; }; From 46ed9010e912c2b29d45a5fa4182ebcbd80d2050 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 11 Aug 2026 07:48:48 +0000 Subject: [PATCH 2/2] widen event name from symbol to string --- Stellar-contract-spec.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stellar-contract-spec.x b/Stellar-contract-spec.x index 9e93f19..e36026e 100644 --- a/Stellar-contract-spec.x +++ b/Stellar-contract-spec.x @@ -249,7 +249,7 @@ struct SCSpecEventV0 { string doc; string lib<80>; - SCSymbol name; + string name; SCSymbol prefixTopics<2>; SCSpecEventParamV0 params<>; SCSpecEventDataFormat dataFormat;