All notable changes to this project will be documented in this file.
- New builtin function
Crypto.ecrecover_secp256k1: (hash, bytes(65)) => bytes(32)for recovering Ethereum address from message hash and signature.
- New syntax for tuple types. Now 0-tuple type is encoded as
()and regular tuples are encoded by interspersing inner types with
*, for instance
int * string. Parens are not necessary. Note it only affects the types, values remain as their were before, so
(1, "a") : int * string
3.2.0 - 2019-06-28
- New builtin function
require : (bool, string) => (). Defined as
function require(b, err) = if(!b) abort(err)
- New builtin functions
for converting a byte array to a hex string and interpreting it as a big-endian encoded integer respectively.
Bytes.to_str : bytes(_) => string Bytes.to_int : bytes(_) => int
- Public contract functions must now be declared as entrypoints:
Functions in namespaces still use
contract Example = // Exported entrypoint exported_fun(x) = local_fun(x) // Not exported function local_fun(x) = x
private functionfor private functions).
- The return type of
Chain.block_hash(height)has changed, it used to be
0denoted an incorrect height. New return type is
Nonerepresents an incorrect height.
- Event name hashes now use BLAKE2b instead of Keccak256.
- Fixed bugs when defining record types in namespaces.
- Fixed a bug in include path handling when passing options to the compiler.
3.1.0 - 2019-06-03
indexedis now optional for word typed (
address, ...) event arguments.
- State variable pretty printing now produce
'a, 'b, ...instead of
'1, '2, ....
- ACI is restructured and improved:
eventtypes (if present) now appear at the top level.
- Namespaces and remote interfaces are no longer ignored.
- All type definitions are included in the interface rendering.
- API functions are renamed, new functions are
- Fixed a bug in
to_sophia_value- it can now handle negative literals.
3.0.0 - 2019-05-21
statefulannotations are now properly enforced. Functions must be marked stateful in order to update the state or spend tokens.
Oracle.check_queryhas been added to Sophia.
- A byte array type
bytes(N)has been added to generalize
hash (== bytes(32))and
signature (== bytes(64))and allow for byte arrays of arbitrary fixed length.
Crypto.ecverify_secp256k1has been added.
- Address literals (+ Oracle, Oracle query and remote contracts) have been changed
#<hex>to address as
ok_<base58check>, oracle query
oq_<base58check>and remote contract
- The compilation and typechecking of
let m(f, xs) = map(f, xs)) was not working properly and has been fixed.
let rechas been removed from the language, it has never worked.
- The standalone CLI compiler is served in the repo
aeternity/aesophia_cliand has been completely removed from
2.1.0 - 2019-04-11
- Stubs (not yet wired up) for compilation to FATE
- Add functions specific for Calldata decoding
- Support for
Auth.tx_hash, not available in AEVM until Fortuna release
- Improvements to the ACI generator
2.0.0 - 2019-03-11
Crypto.ecverifyto the compiler.
String.sha256to the compiler.
- Add the
bitstype for working with bit fields in Sophia.
- Add Namespaces to Sophia in order to simplify using library contracts, etc.
- Add a missig type check on the
initfunction - detects programmer errors earlier.
- Add the ACI (Aeternity Contract Interface) generator.
- Use native bit shift operations in builtin functions, reducing gas cost.
- Improve type checking of
recordfields - generates more understandable error messages.
- Improved, more coherent, error messages.
- Simplify calldata creation - instead of passing a compiled contract, simply pass a (stubbed) contract string.