Skip to content

Commit

Permalink
feat: Add BigInt serialization
Browse files Browse the repository at this point in the history
Add custom serialization function in utils
Improve types in near-bindgen and use serialization function
Add separate serialization for function returns
Add serialization to collections
Add serialization tests
Add serialization build and tests scripts
  • Loading branch information
petarvujovic98 committed Sep 21, 2022
1 parent 06c9ed6 commit 6afa6c1
Show file tree
Hide file tree
Showing 21 changed files with 280 additions and 127 deletions.
2 changes: 1 addition & 1 deletion lib/build-tools/near-bindgen-exporter.js

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

12 changes: 6 additions & 6 deletions lib/collections/lookup-map.js

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

9 changes: 5 additions & 4 deletions lib/collections/lookup-set.js

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

4 changes: 2 additions & 2 deletions lib/collections/unordered-map.js

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

14 changes: 7 additions & 7 deletions lib/collections/unordered-set.js

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

16 changes: 8 additions & 8 deletions lib/collections/vector.js

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

20 changes: 11 additions & 9 deletions lib/near-bindgen.d.ts

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

39 changes: 18 additions & 21 deletions lib/near-bindgen.js

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

2 changes: 2 additions & 0 deletions lib/utils.d.ts

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

24 changes: 24 additions & 0 deletions lib/utils.js

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

2 changes: 1 addition & 1 deletion src/build-tools/near-bindgen-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function executePromise(classId) {
[
t.callExpression(
t.memberExpression(classId, t.identifier("_serialize")),
[t.identifier("_result")]
[t.identifier("_result"), t.booleanLiteral(true)]
),
]
)
Expand Down
Loading

0 comments on commit 6afa6c1

Please sign in to comment.