480 Commits

Author SHA1 Message Date
Ulf Norell
dc5fd74934 Fix include path not being added if giving explicit options 2019-06-28 10:28:16 +02:00
Ulf Norell
6a59e455ce Update tests for entrypoints 2019-06-28 09:42:28 +02:00
Ulf Norell
85408a12a2 Update ACI to new entrypoint declarations
also make ACI understand namespaces
2019-06-28 09:36:07 +02:00
Ulf Norell
79137e058e Revamp private/public functions
Problem: having public as the default makes it very easy to accidentally
export local function by forgetting the `private` modifier.

Solution: functions are private by default and must be declared as `entrypoint`s
to be exported. So `entrypoint foo() = ...` instead of `function foo() = ...`.

We still accept the `private` modifier although it is redundant.
2019-06-28 09:36:07 +02:00
Hans Svensson
dd5fc17554
Merge pull request #99 from aeternity/PT-166897066-run_http_contracts_on_fate
Pt 166897066 run http contracts on fate
2019-06-28 07:49:04 +02:00
Hans Svensson
a617a6469d Change Chain.block_hash to return option(hash) 2019-06-27 14:19:39 +02:00
Hans Svensson
502a4e6464 Fix to_sophia_value for FATE backend 2019-06-27 10:42:31 +02:00
Hans Svensson
c647a2cd34
Merge pull request #98 from aeternity/namespace-fix
Namespace fix
2019-06-27 09:34:48 +02:00
Ulf Norell
292d1aa65b Fix namespace bug
Don't unfold record types until all contracts/namespaces have been checked
2019-06-27 09:15:27 +02:00
Ulf Norell
259bae1720 Test case for another name space bug 2019-06-27 09:15:27 +02:00
Hans Svensson
a47fa59f5b
Merge pull request #97 from aeternity/PT-166899532-static_hashing_for_events
Pre-compute and switch to Blake2b for event name hash
2019-06-26 14:22:43 +02:00
Hans Svensson
2bf5e59e2b Pre-compute and switch to Blake2b for event name hash 2019-06-26 13:34:57 +02:00
Tobias Lindahl
02ba4b265b
Merge pull request #96 from aeternity/PT-166233700-fate-nameservice
Implement aens instructions for fate
2019-06-26 13:33:47 +02:00
Tobias Lindahl
c26ace6c2c Implement aens instructions for fate 2019-06-26 13:24:48 +02:00
Hans Svensson
cfb1605a76
Merge pull request #95 from aeternity/PT-166233670-fate-events
PT-166233670 FATE events
2019-06-26 08:48:44 +02:00
Ulf Norell
20085301ef aebytecode commit 2019-06-25 19:58:14 +02:00
Ulf Norell
3c8d9561a0 More thorough test for different event types 2019-06-25 19:58:14 +02:00
Ulf Norell
523d6b03a9 Allow bytes(N) as indices if N =< 32 and payload if N > 32 2019-06-25 19:58:14 +02:00
Ulf Norell
961f557215 Events now compile to FATE 2019-06-25 19:58:14 +02:00
Ulf Norell
0cf6a52b26 Compile events to FATE 2019-06-25 19:58:14 +02:00
Ulf Norell
a3efaf71a7 Compile oracle check functions in FATE backend 2019-06-25 16:27:48 +02:00
Ulf Norell
c7a8a4af22
Merge pull request #94 from aeternity/bytes-to-x
Add Bytes.to_int and Bytes.to_str
2019-06-24 14:56:20 +02:00
Ulf Norell
0ef7c59771 Fix issues discovered by dialyzer 2019-06-24 14:29:20 +02:00
Ulf Norell
894ae19435 aebytecode commit 2019-06-24 14:25:08 +02:00
Ulf Norell
cee8a4ecf3 Compile bytes_to_X in AEVM backend 2019-06-24 14:09:20 +02:00
Ulf Norell
bde5a3c071 Compile bytes_to_X in FATE backend 2019-06-24 11:44:23 +02:00
Ulf Norell
6612c29758 Type check Bytes.to_X builtins 2019-06-24 11:44:07 +02:00
Ulf Norell
2e0c44862c
Merge pull request #93 from aeternity/PT-166788837-bytes
PT-166788837 bytes
2019-06-24 07:18:33 +02:00
Ulf Norell
7fa98892a8 Fix compiler crash on missing let body 2019-06-21 14:16:26 +02:00
Ulf Norell
d38367e023 Fix bug in type checker 2019-06-20 16:02:19 +02:00
Ulf Norell
592869bf75 aebytecode commit 2019-06-20 15:39:55 +02:00
Ulf Norell
4f9d4e5c07 Update compiler for bytes 2019-06-20 14:36:08 +02:00
Thomas Arts
20aeade545
Merge pull request #91 from aeternity/PT-166696064-add-calldata-decode
Pt 166696064 add calldata decode
2019-06-20 14:26:44 +02:00
Thomas Arts
c745827c53
Update src/aeso_vm_decode.erl
Co-Authored-By: Hans Svensson <hanssv@gmail.com>
2019-06-20 14:19:39 +02:00
Thomas Arts
389e931674 Unit type instead of bool 2019-06-20 13:13:28 +02:00
Thomas Arts
d571993405 Fix type spec 2019-06-20 13:13:25 +02:00
Thomas Arts
ff11943576 Add test contract 2019-06-20 13:10:08 +02:00
Thomas Arts
66528c8a6a Move translate_vm to aeso_vm_decode 2019-06-20 13:10:08 +02:00
Thomas Arts
46c746da1c Refactor string_to_code 2019-06-20 13:10:08 +02:00
Thomas Arts
d3ce5010d0 Update tests 2019-06-20 13:10:08 +02:00
Thomas Arts
1c346af85e whitespaces 2019-06-20 13:10:08 +02:00
Tobias Lindahl
69fa03ca9f
Merge pull request #92 from aeternity/PT-166786424-check-oracle-types
Add type information to oracle instructions
2019-06-20 10:31:04 +02:00
Tobias Lindahl
03c6ae1c74 Add type information to oracle instructions 2019-06-20 09:23:09 +02:00
Tobias Lindahl
990df562e0
Handle oracle operation in FATE (#90)
* Handle oracle operation in FATE

Keep oracle type information on fcode level

Introduce typereps as values

Handle oracle registration

Handle oracle query object and oracle_query op

Handle oracle get question

Handle oracle query fee

Handle oracle get answer

Handle oracle respond

Handle oracle extend

* Address review comment
2019-06-18 14:32:08 +02:00
Hans Svensson
fc82b1646c
Merge pull request #89 from aeternity/PT-164629640-auth_tx_hash_for_fatge
Pt 164629640 auth tx hash for FATE
2019-06-18 08:51:13 +02:00
Hans Svensson
81f277127d Handle signature, hash and map in create_calldata for FATE 2019-06-14 16:08:59 +02:00
Hans Svensson
11dc632927 Add handling of auth_tx_hash 2019-06-14 13:14:24 +02:00
Thomas Arts
e81439779c
Merge pull request #87 from aeternity/PT-166636909-avoid-calldata-collision
Pt 166636909 avoid calldata collision
2019-06-14 13:09:25 +02:00
Thomas Arts
e5c64a5fad Add lit_to_fate and fix cons translation 2019-06-14 12:41:36 +02:00
Thomas Arts
a34558412d Arguments are in the body of the call, use term_to_fate before serializing them 2019-06-14 12:41:21 +02:00