Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1975ccf804 | |||
| 4f68729631 | |||
| 10c845d3cf | |||
| 393d7710c1 | |||
| 37e5a92b2e | |||
| cb9c9df103 | |||
| c09313a92c | |||
| 75b2d6981f | |||
| 78d94786b6 | |||
| 216f7f8a25 | |||
| 254172e3a3 | |||
| eadb4e8c83 | |||
| 3996b6a711 |
@@ -21,3 +21,4 @@ rebar3.crashdump
|
|||||||
aesophia
|
aesophia
|
||||||
.qcci
|
.qcci
|
||||||
current_counterexample.eqc
|
current_counterexample.eqc
|
||||||
|
test/contracts/test.aes
|
||||||
|
|||||||
+7
-1
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
## [6.0.1] 2021-06-24
|
||||||
|
### Changed
|
||||||
|
- Fixed a bug in calldata encoding for contracts containing multiple contracts
|
||||||
|
- Fixed a missing `include` in the `Frac` standard library
|
||||||
|
|
||||||
## [6.0.0] 2021-05-26
|
## [6.0.0] 2021-05-26
|
||||||
### Added
|
### Added
|
||||||
- Child contracts
|
- Child contracts
|
||||||
@@ -298,7 +303,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Simplify calldata creation - instead of passing a compiled contract, simply
|
- Simplify calldata creation - instead of passing a compiled contract, simply
|
||||||
pass a (stubbed) contract string.
|
pass a (stubbed) contract string.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/aeternity/aesophia/compare/v6.0.0...HEAD
|
[Unreleased]: https://github.com/aeternity/aesophia/compare/v6.0.1...HEAD
|
||||||
|
[6.0.1]: https://github.com/aeternity/aesophia/compare/v6.0.0...v6.0.1
|
||||||
[6.0.0]: https://github.com/aeternity/aesophia/compare/v5.0.0...v6.0.0
|
[6.0.0]: https://github.com/aeternity/aesophia/compare/v5.0.0...v6.0.0
|
||||||
[5.0.0]: https://github.com/aeternity/aesophia/compare/v4.3.0...v5.0.0
|
[5.0.0]: https://github.com/aeternity/aesophia/compare/v4.3.0...v5.0.0
|
||||||
[4.3.0]: https://github.com/aeternity/aesophia/compare/v4.2.0...v4.3.0
|
[4.3.0]: https://github.com/aeternity/aesophia/compare/v4.2.0...v4.3.0
|
||||||
|
|||||||
+3
-3
@@ -194,7 +194,7 @@ contract IntHolder =
|
|||||||
entrypoint get() = state
|
entrypoint get() = state
|
||||||
|
|
||||||
main contract IntHolderFactory =
|
main contract IntHolderFactory =
|
||||||
entrypoint new(x : int) : IntHolder =
|
stateful entrypoint new(x : int) : IntHolder =
|
||||||
let ih = Chain.create(x) : IntHolder
|
let ih = Chain.create(x) : IntHolder
|
||||||
ih
|
ih
|
||||||
```
|
```
|
||||||
@@ -802,8 +802,8 @@ will emit one Event of each kind in the example.
|
|||||||
|
|
||||||
```sophia
|
```sophia
|
||||||
entrypoint emit_events() : () =
|
entrypoint emit_events() : () =
|
||||||
Chain.event(TheFirstEvent(42))
|
Chain.event(Event1(42, 34, "foo"))
|
||||||
Chain.event(AnotherEvent(Contract.address, "This is not indexed"))
|
Chain.event(Event2("This is not indexed", Contract.address))
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Argument order
|
#### Argument order
|
||||||
|
|||||||
+10
-2
@@ -645,7 +645,7 @@ Call.value : int
|
|||||||
The amount of coins transferred to the contract in the call.
|
The amount of coins transferred to the contract in the call.
|
||||||
|
|
||||||
|
|
||||||
#### gas
|
#### gas_price
|
||||||
```
|
```
|
||||||
Call.gas_price : int
|
Call.gas_price : int
|
||||||
```
|
```
|
||||||
@@ -653,7 +653,15 @@ Call.gas_price : int
|
|||||||
The gas price of the current call.
|
The gas price of the current call.
|
||||||
|
|
||||||
|
|
||||||
#### gas
|
#### fee
|
||||||
|
```
|
||||||
|
Call.fee : int
|
||||||
|
```
|
||||||
|
|
||||||
|
The fee of the current call.
|
||||||
|
|
||||||
|
|
||||||
|
#### gas_left
|
||||||
```
|
```
|
||||||
Call.gas_left() : int
|
Call.gas_left() : int
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
include "String.aes"
|
||||||
|
|
||||||
namespace Frac =
|
namespace Frac =
|
||||||
|
|
||||||
private function gcd(a : int, b : int) =
|
private function gcd(a : int, b : int) =
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
{base_plt_apps, [erts, kernel, stdlib, crypto, mnesia]}
|
{base_plt_apps, [erts, kernel, stdlib, crypto, mnesia]}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{relx, [{release, {aesophia, "6.0.0"},
|
{relx, [{release, {aesophia, "6.0.1"},
|
||||||
[aesophia, aebytecode, getopt]},
|
[aesophia, aebytecode, getopt]},
|
||||||
|
|
||||||
{dev_mode, true},
|
{dev_mode, true},
|
||||||
|
|||||||
@@ -244,8 +244,9 @@ check_call1(ContractString0, FunName, Args, Options) ->
|
|||||||
fate ->
|
fate ->
|
||||||
%% First check the contract without the __call function
|
%% First check the contract without the __call function
|
||||||
#{ fcode := OrgFcode
|
#{ fcode := OrgFcode
|
||||||
|
, fcode_env := #{child_con_env := ChildContracts}
|
||||||
, ast := Ast } = string_to_code(ContractString0, Options),
|
, ast := Ast } = string_to_code(ContractString0, Options),
|
||||||
FateCode = aeso_fcode_to_fate:compile(OrgFcode, []),
|
FateCode = aeso_fcode_to_fate:compile(ChildContracts, OrgFcode, []),
|
||||||
%% collect all hashes and compute the first name without hash collision to
|
%% collect all hashes and compute the first name without hash collision to
|
||||||
SymbolHashes = maps:keys(aeb_fate_code:symbols(FateCode)),
|
SymbolHashes = maps:keys(aeb_fate_code:symbols(FateCode)),
|
||||||
CallName = first_none_match(?CALL_NAME, SymbolHashes,
|
CallName = first_none_match(?CALL_NAME, SymbolHashes,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{application, aesophia,
|
{application, aesophia,
|
||||||
[{description, "Contract Language for aeternity"},
|
[{description, "Compiler for Aeternity Sophia language"},
|
||||||
{vsn, "6.0.0"},
|
{vsn, "6.0.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications,
|
{applications,
|
||||||
[kernel,
|
[kernel,
|
||||||
|
|||||||
@@ -90,6 +90,23 @@ simple_compile_test_() ->
|
|||||||
end} || Backend <- [aevm, fate] ] ++
|
end} || Backend <- [aevm, fate] ] ++
|
||||||
[].
|
[].
|
||||||
|
|
||||||
|
%% Check if all modules in the standard library compile
|
||||||
|
stdlib_test_() ->
|
||||||
|
{ok, Files} = file:list_dir(aeso_stdlib:stdlib_include_path()),
|
||||||
|
[ { "Testing " ++ File ++ " from the stdlib",
|
||||||
|
fun() ->
|
||||||
|
String = "include \"" ++ File ++ "\"\nmain contract Test =\n entrypoint f(x) = x",
|
||||||
|
Options = [{src_file, File}, {backend, fate}],
|
||||||
|
case aeso_compiler:from_string(String, Options) of
|
||||||
|
{ok, #{fate_code := Code}} ->
|
||||||
|
Code1 = aeb_fate_code:deserialize(aeb_fate_code:serialize(Code)),
|
||||||
|
?assertMatch({X, X}, {Code1, Code});
|
||||||
|
{error, Error} -> io:format("\n\n~p\n\n", [Error]), print_and_throw(Error)
|
||||||
|
end
|
||||||
|
end} || File <- Files,
|
||||||
|
lists:suffix(".aes", File)
|
||||||
|
].
|
||||||
|
|
||||||
check_errors(no_error, Actual) -> ?assertMatch(#{}, Actual);
|
check_errors(no_error, Actual) -> ?assertMatch(#{}, Actual);
|
||||||
check_errors(Expect, #{}) ->
|
check_errors(Expect, #{}) ->
|
||||||
?assertEqual({error, Expect}, ok);
|
?assertEqual({error, Expect}, ok);
|
||||||
|
|||||||
Reference in New Issue
Block a user