Skip to content

Commit

Permalink
Merge pull request #558 from multiversx/TOOL-422-add-support-for-array-6
Browse files Browse the repository at this point in the history
Add support for Array6
  • Loading branch information
danielailie authored Jan 16, 2025
2 parents 9bc160b + fb99316 commit 3fe389c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-core",
"version": "13.16.0",
"version": "13.17.0",
"description": "MultiversX SDK for JavaScript and TypeScript",
"author": "MultiversX",
"homepage": "https://multiversx.com",
Expand Down
1 change: 1 addition & 0 deletions src/smartcontracts/typesystem/typeMapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe("test mapper", () => {
it("should map arrays", () => {
testArrayMapping("array2<BigUint>", 2, new BigUIntType());
testArrayMapping("array2<u32>", 2, new U32Type());
testArrayMapping("array6<u8>", 6, new U8Type());
testArrayMapping("array8<BigUint>", 8, new BigUIntType());
testArrayMapping("array48<u8>", 48, new U8Type());
testArrayMapping("array256<BigUint>", 256, new BigUIntType());
Expand Down
1 change: 1 addition & 0 deletions src/smartcontracts/typesystem/typeMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class TypeMapper {
// Known-length arrays.
// TODO: Handle these in typeExpressionParser!
["array2", (...typeParameters: Type[]) => new ArrayVecType(2, typeParameters[0])],
["array6", (...typeParameters: Type[]) => new ArrayVecType(6, typeParameters[0])],
["array8", (...typeParameters: Type[]) => new ArrayVecType(8, typeParameters[0])],
["array16", (...typeParameters: Type[]) => new ArrayVecType(16, typeParameters[0])],
["array20", (...typeParameters: Type[]) => new ArrayVecType(20, typeParameters[0])],
Expand Down

0 comments on commit 3fe389c

Please sign in to comment.