Skip to content

Commit

Permalink
Merge pull request #205 from ElrondNetwork/hotfix-type-mapper
Browse files Browse the repository at this point in the history
Add extra type for known-length arrays.
  • Loading branch information
andreibancioiu authored May 2, 2022
2 parents afda897 + 2c160f6 commit 22bbcc4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
## Unreleased
- TBD

## [9.2.5]
- [Add extra type for known-length arrays.](https://github.com/ElrondNetwork/elrond-sdk-erdjs/pull/205)

## [9.2.4]
- [Hardcode class names for classes within erdjs' typesystem.](https://github.com/ElrondNetwork/elrond-sdk-erdjs/pull/164)

Expand Down
2 changes: 1 addition & 1 deletion 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": "@elrondnetwork/erdjs",
"version": "9.2.4",
"version": "9.2.5",
"description": "Smart Contracts interaction framework",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
3 changes: 2 additions & 1 deletion src/smartcontracts/typesystem/typeMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export class TypeMapper {
// TODO: Handle these in typeExpressionParser, perhaps?
["array20", (...typeParameters: Type[]) => new ArrayVecType(20, typeParameters[0])],
["array32", (...typeParameters: Type[]) => new ArrayVecType(32, typeParameters[0])],
["array64", (...typeParameters: Type[]) => new ArrayVecType(64, typeParameters[0])],
["array46", (...typeParameters: Type[]) => new ArrayVecType(46, typeParameters[0])],
["array64", (...typeParameters: Type[]) => new ArrayVecType(64, typeParameters[0])]
]);

// For closed types, we hold actual type instances instead of type constructors / factories (no type parameters needed).
Expand Down

0 comments on commit 22bbcc4

Please sign in to comment.