Ulf Norell
d8dd6b900f
Remove unused test contract
2019-05-13 17:51:56 +02:00
Ulf Norell
74d4048d9f
Check that init doesn't read or write the state
2019-05-13 17:51:47 +02:00
Ulf Norell
5aed8b3ef5
Check stateful annotations
...
Functions must be annotated as `stateful` in order to
- Update the contract state (using `put`)
- Call `Chain.spend` or other primitive functions that cost tokens
- Call an Oracle or AENS function that requires a signature
- Make a remote call with a non-zero value
- Construct a lambda calling a stateful function
It does not need to be stateful to
- Read the contract state
- Call another contract with value=0, even when the remote function is stateful
2019-05-13 13:39:17 +02:00
Ulf Norell
e1a798aef4
Check for repeated argument names to functions
...
(PT-159592825)
2019-05-10 15:51:42 +02:00
Ulf Norell
23cc8e1132
Letrec and letfun ( #65 )
...
* Type check and compile letfuns
* Minor code simplification
* Remove let rec from Sophia
2019-05-10 13:27:57 +02:00
Hans Svensson
192ec207a7
Add Contract.creator and address checking primitives
2019-05-09 09:54:04 +02:00
Ulf Norell
8a381e5ef1
Support equality on bytes(N)
2019-04-25 16:06:50 +02:00
Hans Svensson
4324bfd49e
Add bytes(int), add address_literalsm add ecverify_secp25k1
...
hash -> bytes(32)
signature -> bytes(64)
address literals
2019-04-23 10:40:02 +02:00
Hans Svensson
d6a55e144e
Test Auth.tx_hash compilation
2019-04-08 11:57:07 +02:00
Robert Virding
4a01c852c9
Add more test cases
...
And some trivial code cleanup.
2019-04-03 22:58:54 +02:00
Robert Virding
df00c3958b
First version of final aci
...
Should have more test cases and code cleanup
2019-04-03 17:53:16 +02:00
Robert Virding
12cb37245b
First version of new aci generator
...
We also include some updated simple tests which are only run by eunit.
2019-04-03 17:53:16 +02:00
Robert Virding
0d8b7c7c79
First commit fixinng references from aeso_ to aeb_
...
Also remove local copies of modules moved to aebytecode.
2019-04-02 15:59:12 +02:00
Hans Svensson
15ca37342c
Remove aeso_blake2, use eblake2
2019-04-02 09:00:20 +02:00
Hans Svensson
cd116b23d7
add aeso_compiler:decode_calldata/3
2019-03-13 16:15:48 +01:00
Ulf Norell
3efde2a2a1
handle hash literals when permissive_address_literals
2019-03-01 11:36:28 +01:00
Ulf Norell
20f2a05638
fix problem with indent detection when inserting the __call function
2019-03-01 11:08:14 +01:00
Ulf Norell
56f70fea6c
test oracle calldata fixes
2019-03-01 09:36:43 +01:00
Robert Virding
8619f47ee6
Add very basic ACI testing
...
These should be extended and expanded.
2019-02-28 16:13:57 +01:00
Hans Svensson
95bf0d4b6c
Fix handling of init in create_calldata
2019-02-27 20:42:42 +01:00
Hans Svensson
e94c1f9d84
Merge pull request #30 from aeternity/to-sophia-value-revisited
...
To sophia value revisited
2019-02-27 11:36:03 +01:00
Ulf Norell
4c79f7b9f2
tests for calldata creation
2019-02-26 17:41:04 +01:00
Hans Svensson
7c95aafbb8
Merge pull request #29 from aeternity/more_better_errors
...
Improve Events error message + more tests
2019-02-26 16:21:35 +01:00
Ulf Norell
5a4a84805f
change create_calldata function to also take fun name and arguments
2019-02-26 15:01:27 +01:00
Ulf Norell
cc3e322179
new version of to_sophia_value
...
takes function name and binary blob
2019-02-26 14:34:57 +01:00
Hans Svensson
7b474e439c
Improve Events error message + more tests
2019-02-25 21:53:52 +01:00
Ulf Norell
dc4a2ca2f9
tests for aeso:compiler:to_sophia_value/2
2019-02-25 14:24:16 +01:00
Ulf Norell
aa6d56ce9b
Allow passing an explicit "file system" for included files to the compiler
2019-02-08 14:16:06 +01:00
Ulf Norell
0b86cdc318
Clean up test case
2019-02-08 14:16:06 +01:00
Hans Svensson
421bc01012
Add error messages for bad include and nested namespace
2019-02-08 14:16:06 +01:00
Hans Svensson
2b7490776e
Add include directive
...
Add an include directive to include namespaces into a contract. Only allowed at the top level.
To allow includes, either call through aeso_compiler:file or set the option `allow_include` (and add `include_path`(s)).
2019-02-08 14:16:06 +01:00
Ulf Norell
6cdba58e35
Update error messages
2019-02-08 14:16:06 +01:00
Ulf Norell
e6f01481bf
Bind state and event primitives only in contracts (and with the right types)
2019-02-08 14:16:06 +01:00
Ulf Norell
d9188d58a7
Proper checking of types
2019-02-08 14:16:06 +01:00
Ulf Norell
dfa286d43c
Deadcode elimination (icode post pass)
2019-02-08 14:16:06 +01:00
Ulf Norell
478da2af33
Don't expose namespace functions as entrypoints
2019-02-08 14:16:06 +01:00
Ulf Norell
10be09fe30
Add checks on event constructor arguments to type checker
2019-02-08 14:16:06 +01:00
Ulf Norell
367f87b612
Implement namespaces
...
This includes a massive refactoring of the type checker, getting
rid of most of the ets tables and keeping a proper environment.
2019-02-08 14:16:06 +01:00
Ulf Norell
53299b9b17
Merge pull request #17 from aeternity/PT-163478903-builtin-bits-type
...
PT-163478903 builtin bits type
2019-01-28 10:05:09 +01:00
Robert Virding
a73abf8e8e
Fix testing to use new error message format
2019-01-25 16:16:20 +01:00
Ulf Norell
a367d5040a
Add builtin bit field type
2019-01-25 16:09:31 +01:00
Ulf Norell
d8bf0bda45
Remove integer bit operations
2019-01-25 16:09:31 +01:00
Hans Svensson
0d78a5e4a0
Add Erlang implementation of Blake2B
...
This removes the dependency on enacl, and NIFs.
2019-01-14 10:58:25 +01:00
Ulf Norell
783d74dff1
Check for missing fields in record expressions
2019-01-11 14:23:53 +01:00
Ulf Norell
7849fe302c
Add missing type check of init function
2019-01-08 12:27:39 +01:00
Thomas Arts
4853d386e4
update changes from epoch master
2019-01-07 19:17:49 +01:00
Robert Virding
d4d02fd576
First test work commit, don't touch
2018-12-22 01:23:40 +01:00