Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Stellar-contract-spec.x
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -82,7 +88,7 @@ struct SCSpecTypeBytesN

struct SCSpecTypeUDT
{
string name<60>;
string name<SC_SPEC_TYPE_NAME_LIMIT>;
};

union SCSpecTypeDef switch (SCSpecType type)
Expand Down Expand Up @@ -134,7 +140,7 @@ struct SCSpecUDTStructV0
{
string doc<SC_SPEC_DOC_LIMIT>;
string lib<80>;
string name<60>;
string name<SC_SPEC_TYPE_NAME_LIMIT>;
SCSpecUDTStructFieldV0 fields<>;
};

Expand Down Expand Up @@ -169,7 +175,7 @@ struct SCSpecUDTUnionV0
{
string doc<SC_SPEC_DOC_LIMIT>;
string lib<80>;
string name<60>;
string name<SC_SPEC_TYPE_NAME_LIMIT>;
SCSpecUDTUnionCaseV0 cases<>;
};

Expand All @@ -184,7 +190,7 @@ struct SCSpecUDTEnumV0
{
string doc<SC_SPEC_DOC_LIMIT>;
string lib<80>;
string name<60>;
string name<SC_SPEC_TYPE_NAME_LIMIT>;
SCSpecUDTEnumCaseV0 cases<>;
};

Expand All @@ -199,7 +205,7 @@ struct SCSpecUDTErrorEnumV0
{
string doc<SC_SPEC_DOC_LIMIT>;
string lib<80>;
string name<60>;
string name<SC_SPEC_TYPE_NAME_LIMIT>;
SCSpecUDTErrorEnumCaseV0 cases<>;
};

Expand Down
Loading