Go to file
KtorZ 53fb821b62
Use double-quotes for utf-8 bytearrays, and @"..." for string literals
The core observation is that **in the context of Aiken** (i.e. on-chain logic)
  people do not generally want to use String. Instead, they want
  bytearrays.

  So, it should be easy to produce bytearrays when needed and it should
  be the default. Before this commit, `"foo"` would parse as a `String`.
  Now, it parses as a `ByteArray`, whose bytes are the UTF-8 bytes
  encoding of "foo".

  Now, to make this change really "fool-proof", we now want to:

  - [ ] Emit a parse error if we parse a UTF-8 bytearray literal in
    place where we would expect a `String`. For example, `trace`,
    `error` and `todo` can only be followed by a `String`.

    So when we see something like:

    ```
    trace "foo"
    ```

    we know it's a mistake and we can suggest users to use:

    ```
    trace @"foo"
    ```

    instead.

  - [ ] Emit a warning if we ever see a bytearray literals UTF-8, which
    is either 56 or 64 character long and is a valid hexadecimal string.
    For example:

    ```
    let policy_id = "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6"
    ```

    This is _most certainly_ a mistake, as this generates a ByteArray of
    56 bytes, which is effectively the hex-encoding of the provided string.

    In this scenario, we want to warn the user and inform them they probably meant to use:

    ```
    let policy_id = #"29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6"
    ```
2023-02-19 10:09:22 +01:00
.github Add missing cbor-diag dependency for running acceptance tests. 2023-02-15 10:46:18 +01:00
crates Use double-quotes for utf-8 bytearrays, and @"..." for string literals 2023-02-19 10:09:22 +01:00
examples fix: the refactor on discharge value env (#393) 2023-02-18 20:49:29 -05:00
.editorconfig rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6} 2022-12-14 09:45:24 +01:00
.gitattributes Add support for Nix flakes. 2023-02-07 13:16:17 +01:00
.gitignore Define 'local' gitignore for examples' packages. 2023-01-06 13:30:56 +01:00
CHANGELOG.md feat(aiken-project): use rayon to run tests in parallel 2023-01-09 18:12:18 -05:00
CONTRIBUTING.md chore: clean some links up so they point to the new repo 2022-12-17 11:19:02 -05:00
Cargo.lock Fix todo/error parser on when clauses. 2023-02-16 00:40:49 +01:00
Cargo.nix [create-pull-request] automated change 2023-02-15 23:50:11 +00:00
Cargo.toml chore: remove debug symbols in release 2023-02-01 18:53:11 -05:00
LICENSE Tweak LICENSE 2022-12-20 05:47:13 +01:00
README.md Add support for Nix flakes. 2023-02-07 13:16:17 +01:00
bonnie.toml chore: retire mdbook 2022-12-15 14:17:36 -05:00
flake.lock Add support for Nix flakes. 2023-02-07 13:16:17 +01:00
flake.nix Add support for Nix flakes. 2023-02-07 13:16:17 +01:00

README.md

Aiken Aiken

A modern smart contract platform for Cardano

Licence Crates.io Rust Build


QuickStart

Prerequisites

For now you'll need rust installed, see rustup.

Getting started

In case you have fresh installation of rustup you might need to do:

rustup install stable
$ cargo install --git https://github.com/aiken-lang/aiken.git

$ aiken --help

Alternatively nix builds are available via flakes.

How to use

For more information please see the user manual.

Roadmap

Aiken defines its roadmap using Github Milestones. The roadmap isn't set in stone, but gives a high-level overview of where the project is headed for.

Contributing

Want to contribute? See CONTRIBUTING.md to know how.


Note

The name comes from Howard Aiken, an American physicist and a pioneer in computing.