Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract metadata #71

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
68dde2c
Add bindings in compilation pass
willemneal Aug 15, 2019
e8dbaf4
Cleaned up and added README.md
willemneal Aug 15, 2019
cc18651
Cleaned up
willemneal Aug 15, 2019
035aa2d
Added new runtime imports
willemneal Aug 15, 2019
2e64c22
Update dist files for testing elsewhere
willemneal Aug 15, 2019
eeb3d0d
Passes tests but uses u32 instead of u64
willemneal Aug 15, 2019
3bec9a0
Create dev build for testing
willemneal Aug 15, 2019
b9cb2f1
Fix type casting error
willemneal Aug 16, 2019
e9daba7
Updated dist files for asc
willemneal Aug 16, 2019
843b0a1
Update tests to use bigint and experimental wasm bigint support in node
willemneal Aug 16, 2019
80a2696
Keep @unmanaged, but define it in webpack
willemneal Aug 16, 2019
92e5289
Add out option for near files
Aug 17, 2019
92cc5a2
Fix u64 parsing
Aug 19, 2019
9b1b97d
Do not retain unmanaged allocations in generated ctors (#762)
dcodeIO Aug 16, 2019
dc67549
Initial stab
willemneal Aug 20, 2019
7bf26d5
Add toString typings for Number and Boolean (#769)
willemneal Aug 21, 2019
5097e76
Emit an error instead of aborting when inferring unused type paramete…
dcodeIO Aug 21, 2019
3efda08
compiles
willemneal Aug 21, 2019
fcb5aa7
It works!
willemneal Aug 22, 2019
c3002ac
Simple Generics now encode and decode
willemneal Aug 22, 2019
3c1fe17
Arg parsing works again
willemneal Aug 22, 2019
9c08841
Works with bignum
willemneal Aug 22, 2019
66e1e0f
Fix 10 digits case in decimalCount64 (#785)
MaxGraey Aug 23, 2019
6ad9bf2
Improve f64 to i32 conversion for Math.imul and Math.clz32 (#779)
MaxGraey Aug 23, 2019
7ae14e8
Added hello tests
willemneal Aug 23, 2019
4d60357
Hello test now passes
willemneal Aug 23, 2019
8aec2e8
Change build command
willemneal Aug 23, 2019
4ebcacc
Add u64 array support
willemneal Aug 23, 2019
8d001fa
nitpic: space
willemneal Aug 23, 2019
3c2f509
Now passes compiler tests
willemneal Aug 23, 2019
c7c4a21
Add testEntry.ts be included with installation
willemneal Aug 24, 2019
c0d0f13
Make assembly imports devDependencies
willemneal Aug 24, 2019
bd5f354
Make u128 a special case
willemneal Aug 26, 2019
d4d1335
Merge pull request #51 from nearprotocol/u128_bindings
bowenwang1996 Aug 26, 2019
c01a30c
Allow Strings, u128, and Uint8Arrays be serialized as nulls (#52)
willemneal Aug 26, 2019
9bd8750
Fix error from returning null
willemneal Aug 27, 2019
61bda90
Make sure that bindings/dist not included in diff by default
vgrichina Aug 27, 2019
97e1e59
Preview package for avoiding yarn caching issues
janedegtiareva Aug 28, 2019
75a77f8
Bump preview version and make sure it's near-specific
vgrichina Aug 28, 2019
6c58af1
Now entry files are nearfiles by default
Aug 29, 2019
00f39d2
New flag to ignore near transformation
Aug 29, 2019
ed5a6e1
Test if returned result is nullable before encoding it as null
Aug 29, 2019
3cad044
Merge pull request #61 from nearprotocol/fix_null_check
janedegtiareva Aug 29, 2019
4e7b629
Bump preview version
janedegtiareva Aug 29, 2019
c4f05f5
Merge pull request #62 from nearprotocol/preview-bump
janedegtiareva Aug 29, 2019
33a6399
Update hello contract to latest version
janedegtiareva Aug 30, 2019
f8c8736
Merge pull request #63 from nearprotocol/update-hello-contract
bowenwang1996 Aug 30, 2019
85021af
Update dependencies on master
janedegtiareva Sep 3, 2019
13ef3a7
Update package version for npm to 0.7.0
janedegtiareva Sep 3, 2019
bd033a8
Merge pull request #64 from nearprotocol/update-deps-on-master
janedegtiareva Sep 3, 2019
c825b4b
Merge pull request #65 from nearprotocol/update-version
janedegtiareva Sep 3, 2019
04914c1
Merge remote-tracking branch 'AssemblyScript/master' into staging
willemneal Sep 3, 2019
11cc593
Fix loader API to read memory
Sep 4, 2019
550446a
First commit
Sep 7, 2019
e46d7f1
Cleaned up
Sep 8, 2019
a0e43c3
Can decode arguments with type aliases
Sep 8, 2019
1bac2ff
Return to old API
Sep 8, 2019
3edc33a
Reduce allocations
Sep 9, 2019
a8c363c
Change encode API and update near-runtime
willemneal Sep 13, 2019
b5a115c
Merge branch 'upstreamMaster' into simplify-decoding
willemneal Sep 13, 2019
c191ac3
Merge with upstream
willemneal Sep 13, 2019
23e2f17
Merge with Upstream and Simplify Decoding #66
willemneal Sep 13, 2019
607c7dc
basic contract metadata
bowenwang1996 Sep 20, 2019
71e7647
refactor
bowenwang1996 Sep 20, 2019
a1c01cf
Type mapping
bowenwang1996 Sep 20, 2019
52f9b2e
Fix tests
bowenwang1996 Sep 21, 2019
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bin/* text eol=lf
dist/* binary
bindings/dist/* binary
scripts/*.sh eol=lf
lib/binaryen.js binary
tests/compiler/std/string-encoding.ts eol=lf
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
npm-debug.*
docs/
node_modules/
out/
raw/
.history
.history
bindings/dist/transformerBundle\.js\.map
22 changes: 22 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image: node:latest

stages:
- build
- test

cache:
paths:
- node_modules/

install_dependencies:
stage: build
script:
- rm -rf node_modules
- npm install
artifacts:
paths:
- node_modules/

run_tests:
stage: test
script: npm run make
Empty file modified bin/asinit
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions bindings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Near Bindings

This AST transformer is added to the compiler fontend so that it is called automatically after all files have been parsed.

Any file that has `//@nearfile` as the first line, will be processed and a new source text will be generated.

Currently any class defined in the file will have an `encode` and `decode` method for serializing to and from json. Furthermore, any functions that are exported by an entry function are wrapped so that their arguments are deserialized from storage and its return value is serailazed.

Furthermore `./src/preamble.ts` defines a string that can be added to the top of the source file. After each file is processed the new source text is parsed. This means any new imports added in the preamble will be parsed too.
Loading