From 9a0429d5e51b3f58733443b644e0a5b2b10c3592 Mon Sep 17 00:00:00 2001 From: Alexandru Popenta Date: Fri, 16 Jun 2023 15:02:05 +0300 Subject: [PATCH 1/2] add more array sizes for the abi parser --- package-lock.json | 4 ++-- package.json | 2 +- src/smartcontracts/typesystem/typeMapper.ts | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30e00170..cd1b52e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "12.2.1", + "version": "12.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "12.2.1", + "version": "12.2.2", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index 8a6cbaf9..3348b688 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "12.2.1", + "version": "12.2.2", "description": "MultiversX SDK for JavaScript and TypeScript", "main": "out/index.js", "types": "out/index.d.js", diff --git a/src/smartcontracts/typesystem/typeMapper.ts b/src/smartcontracts/typesystem/typeMapper.ts index 2f30eafe..2a94349b 100644 --- a/src/smartcontracts/typesystem/typeMapper.ts +++ b/src/smartcontracts/typesystem/typeMapper.ts @@ -63,10 +63,14 @@ export class TypeMapper { ["tuple8", (...typeParameters: Type[]) => new TupleType(...typeParameters)], // Known-length arrays. // TODO: Handle these in typeExpressionParser! + ["array8", (...typeParameters: Type[]) => new ArrayVecType(8, typeParameters[0])], + ["array16", (...typeParameters: Type[]) => new ArrayVecType(16, typeParameters[0])], ["array20", (...typeParameters: Type[]) => new ArrayVecType(20, typeParameters[0])], ["array32", (...typeParameters: Type[]) => new ArrayVecType(32, typeParameters[0])], ["array46", (...typeParameters: Type[]) => new ArrayVecType(46, typeParameters[0])], ["array64", (...typeParameters: Type[]) => new ArrayVecType(64, typeParameters[0])], + ["array128", (...typeParameters: Type[]) => new ArrayVecType(128, typeParameters[0])], + ["array256", (...typeParameters: Type[]) => new ArrayVecType(256, typeParameters[0])], ]); // For closed types, we hold actual type instances instead of type constructors / factories (no type parameters needed). From 78a5671f535cfc9297bc1bc557bf4d2ab2ef5cf4 Mon Sep 17 00:00:00 2001 From: Alexandru Popenta Date: Fri, 16 Jun 2023 15:06:20 +0300 Subject: [PATCH 2/2] bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41820177..a967a0b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "12.4.0", + "version": "12.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "12.4.0", + "version": "12.4.1", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index d51b4a50..f7167abe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "12.4.0", + "version": "12.4.1", "description": "MultiversX SDK for JavaScript and TypeScript", "main": "out/index.js", "types": "out/index.d.js",