44 Commits

Author SHA1 Message Date
sennui
83d06977f9 add extra argument to claim for bidding 2019-09-01 10:58:49 +02:00
Ulf Norell
6fd39d4cb1 Add checks for polymorphic/higher order oracles and higher order entrypoints (AEVM) 2019-08-30 11:18:20 +02:00
Ulf Norell
5f733e01dd Implement [a..b] 2019-08-27 13:59:01 +02:00
Hans Svensson
ebdd38c505 Change ecverify into verify_sig and then add an actual ecverify 2019-08-21 09:29:40 +02:00
Hans Svensson
e9505e240f Add Address.is_payable(address) 2019-08-19 08:57:31 +02:00
Hans Svensson
f27d37d624 Add payable modifier for contracts and entrypoints 2019-08-19 08:57:31 +02:00
Tino Breddin
dd26649f7d [PT-167805291] Add opcode for ecrecover (#122)
* Add opcode for ecrecover

* Update aebytecode

* Extend signature bytes type used for ecrecover

* Add ecrecover to changelog

* Add some type specs

* Please dialyzer
2019-08-14 21:02:46 +02:00
Radosław Rowicki
b669d2df1e Added list comprehensions and standard List, Option, Func, Pair, and Triple library (#105)
* Added standard List library and list comprehensions

Added List library.

Flatmaps WIP

Fixed dependency in flat_map

fcode generation

Updated tests to use custom list lib

Added comprehension test

Added stdlib

sanity

Test

* Extended stdlib for lists. Added error message for redefinition of stdlibx

* Fixed type template

* Improved stdlib

* More functions

* Fixed cyclic includes

* Refixed imports and added few tests

* Added fail test

* Undelete removed type spec

* Remove typo

* Fix iter function

* Fixed typo

* Added if guards and let statements in list comp

* Added more fail tests

* Option stliv

* 2 and 3 tuple stdlib

* Updated stdlib to new syntax. Added recursor and changed all/any functions

* Fixed performance issues. Changed include management

* Fixed hash type
2019-08-14 13:53:58 +02:00
Hans Svensson
3663b4e5d0 Add no_code option to aeso_compile (for encode/decode calldata) 2019-08-05 14:33:53 +02:00
Radosław Rowicki
4c78ab3aee
Covered qid case in ast_typerep
Because `qid` was not accepted the following code 

```
contract Test = 
   datatype myOption('a) = MyNone | MySome('a)
   entrypoint optionFn(v: myOption(string)): myOption(string) = v
```
Used to lead to `function_clause` error.

Bug copyright (c) @nduchak
2019-07-26 15:31:06 +02:00
Tobias Lindahl
6f873e45b8 Use a name string rather than a name hash in transfer and revoke 2019-07-01 07:42:08 +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
a617a6469d Change Chain.block_hash to return option(hash) 2019-06-27 14:19:39 +02:00
Ulf Norell
cee8a4ecf3 Compile bytes_to_X in AEVM backend 2019-06-24 14:09:20 +02:00
Ulf Norell
17a1fd8095 Add require builtin 2019-06-14 10:27:07 +02:00
Thomas Arts
46963a8326 Update aeso_compiler 2019-06-11 15:25:01 +02:00
radrow
bb5a710626 Popularized use of builtin_call function 2019-05-31 12:21:48 +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
45a62f0807 Simplify ast_typerep 2019-04-24 08:44:05 +02:00
Hans Svensson
3255c62e0e Revert bytes(N) from icode/vm-types 2019-04-23 17:47:50 +02:00
Hans Svensson
5e6af18c7b Address review comment 2019-04-23 11:10:56 +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
db64978d2e Add Auth.tx_hash 2019-04-08 11:57:07 +02:00
Robert Virding
9f5f8d4444 Change function references from aeso_sophia to aeb_aevm_data 2019-04-02 16:00:10 +02:00
Robert Virding
fd0dbdf207 Change references from aeso_memory to aeb_memory 2019-04-02 15:59:12 +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
Ulf Norell
b5b0d30fc4 Less hacky handling of Chain.event 2019-02-08 14:48:38 +01:00
Ulf Norell
0a5b80668f Don't mess up on multiple namespaces in icode compiler 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
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
79de25b3a5 Fix minor bugs in compilation of bit fields 2019-01-25 16:09:31 +01:00
Ulf Norell
3e1290efaf Add Bits.all and rename Bits.zero to Bits.none 2019-01-25 16:09:31 +01:00
Ulf Norell
9c77622c7c Add set operations on bit fields (union, isect, diff) 2019-01-25 16:09:31 +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
23ccce4c22 Use ?SHL and ?SHR for 'bsl' and 'bsr' 2019-01-22 21:53:30 +01:00
Ulf Norell
5fd24fec86 Add more hash primops 2019-01-22 09:09:37 +01:00
Hans Svensson
d8fff8f20f Add Crypto.ecverify 2019-01-21 14:20:15 +01:00
Thomas Arts
b8f4a6b67a Get rid of lager in the compiler 2019-01-07 19:54:53 +01:00
Robert Virding
d4d02fd576 First test work commit, don't touch 2018-12-22 01:23:40 +01:00