diff --git a/docs/images/favicon.png b/.docssite/docs/favicon.png similarity index 100% rename from docs/images/favicon.png rename to .docssite/docs/favicon.png diff --git a/.docssite/hook.py b/.docssite/hook.py new file mode 100644 index 0000000..cc7e359 --- /dev/null +++ b/.docssite/hook.py @@ -0,0 +1,7 @@ +import glob +import shutil + +def pre_build(**kwargs): + for file in glob.glob('../docs/*.md'): + shutil.copy(file, 'docs') + shutil.copy('../CHANGELOG.md', 'docs') diff --git a/mkdocs.yml b/.docssite/mkdocs.yml similarity index 86% rename from mkdocs.yml rename to .docssite/mkdocs.yml index 48882d1..e20d43f 100644 --- a/mkdocs.yml +++ b/.docssite/mkdocs.yml @@ -1,9 +1,9 @@ -site_name: aeternity Sophia Language +site_name: æternity Sophia Language plugins: - search - mkdocs-simple-hooks: hooks: - on_pre_build: 'docs.python.hooks:pre_build' + on_pre_build: 'hook:pre_build' repo_url: 'https://github.com/aeternity/aesophia' edit_uri: '' @@ -12,9 +12,9 @@ extra: provider: mike theme: - favicon: images/favicon.png + favicon: favicon.png name: material - custom_dir: docs/mkdocs-overrides + custom_dir: overrides language: en palette: - scheme: default diff --git a/docs/mkdocs-overrides/main.html b/.docssite/overrides/main.html similarity index 100% rename from docs/mkdocs-overrides/main.html rename to .docssite/overrides/main.html diff --git a/.github/workflows/docs-develop.yml b/.github/workflows/docs-develop.yml index cdf1831..48bc7f6 100644 --- a/.github/workflows/docs-develop.yml +++ b/.github/workflows/docs-develop.yml @@ -16,8 +16,10 @@ jobs: - uses: actions/cache@v2 with: path: ~/.cache/pip3 - key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }} - - run: pip3 install -r docs/python/requirements.txt + key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/requirements.txt') }} + - run: pip3 install -r .github/workflows/requirements.txt - run: git config --global user.email "github-action@users.noreply.github.com" - run: git config --global user.name "GitHub Action" - - run: mike deploy --push master \ No newline at end of file + - run: | + cd .docssite + mike deploy --push master \ No newline at end of file diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.yml index b2dbd1b..4ec58e2 100644 --- a/.github/workflows/docs-release.yml +++ b/.github/workflows/docs-release.yml @@ -16,9 +16,11 @@ jobs: - uses: actions/cache@v2 with: path: ~/.cache/pip3 - key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }} - - run: pip3 install -r docs/python/requirements.txt + key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/requirements.txt') }} + - run: pip3 install -r .github/workflows/requirements.txt - run: git config --global user.email "github-action@users.noreply.github.com" - run: git config --global user.name "GitHub Action" - run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV - - run: mike deploy --push --update-aliases $RELEASE_VERSION latest \ No newline at end of file + - run: | + cd .docssite + mike deploy --push --update-aliases $RELEASE_VERSION latest \ No newline at end of file diff --git a/docs/python/requirements.txt b/.github/workflows/requirements.txt similarity index 100% rename from docs/python/requirements.txt rename to .github/workflows/requirements.txt diff --git a/.gitignore b/.gitignore index f7ebb14..095c8b0 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ aesophia .qcci current_counterexample.eqc test/contracts/test.aes +__pycache__ +.docssite/docs/*.md diff --git a/LICENSE b/LICENSE index 142825a..b4cc822 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2017, aeternity developers +Copyright (c) 2017, æternity developers Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/README.md b/README.md index da75569..c832ecc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is the __sophia__ compiler for the æternity system which compiles contract The compiler is currently being used three places - [The command line compiler](https://github.com/aeternity/aesophia_cli) - [The HTTP compiler](https://github.com/aeternity/aesophia_http) - - In [Aeternity node](https://github.com/aeternity/aeternity) tests + - In [æternity node](https://github.com/aeternity/aeternity) tests ## Documentation @@ -15,7 +15,7 @@ The compiler is currently being used three places * [Standard Library](docs/sophia_stdlib.md) * [Contract Examples](docs/sophia_examples.md) -Additionally you can check out the [contracts section](https://github.com/aeternity/protocol/blob/master/contracts/contracts.md) of the aeternity blockchain specification. +Additionally you can check out the [contracts section](https://github.com/aeternity/protocol/blob/master/contracts/contracts.md) of the æternity blockchain specification. ## Versioning diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index bb4437a..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -__pycache__ -CHANGELOG.md \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 3c1377a..0c1b225 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,8 +5,8 @@ restricted mutable state. Sophia is customized for smart contracts, which can be published to a blockchain. Thus some features of conventional languages, such as floating point arithmetic, are not present in Sophia, and -some [aeternity blockchain](https://aeternity.com) specific primitives, constructions and types have been added. +some [æternity blockchain](https://aeternity.com) specific primitives, constructions and types have been added. !!! Note - For rapid prototyping of smart contracts check out [AEstudio](https://studio.aepps.com/)! - - For playing around with the language in general check out the [REPL](https://repl.aeternity.io/)! + - For playing around and diving deeper into the language itself check out the [REPL](https://repl.aeternity.io/)! diff --git a/docs/python/hooks.py b/docs/python/hooks.py deleted file mode 100644 index 2f38efc..0000000 --- a/docs/python/hooks.py +++ /dev/null @@ -1,4 +0,0 @@ -import shutil - -def pre_build(**kwargs): - shutil.copy('./CHANGELOG.md', './docs') diff --git a/docs/sophia_features.md b/docs/sophia_features.md index bb1d047..6be7ac4 100644 --- a/docs/sophia_features.md +++ b/docs/sophia_features.md @@ -222,7 +222,7 @@ payable stateful entrypoint buy(to : address) = abort("Value too low") ``` -Note: In the Aeternity VM (AEVM) contracts and entrypoints were by default +Note: In the æternity VM (AEVM) contracts and entrypoints were by default payable until the Lima release. ## Namespaces @@ -297,7 +297,7 @@ Sophia has the following types: | Type | Description | Example | |----------------------|---------------------------------------------------------------------------------------------|--------------------------------------------------------------| | int | A 2-complement integer | ```-1``` | -| address | Aeternity address, 32 bytes | ```Call.origin``` | +| address | æternity address, 32 bytes | ```Call.origin``` | | bool | A Boolean | ```true``` | | bits | A bit field | ```Bits.none``` | | bytes(n) | A byte array with `n` bytes | ```#fedcba9876543210``` | @@ -636,7 +636,7 @@ functions are provided. ## AENS interface Contracts can interact with the -[Aeternity Naming System](https://github.com/aeternity/protocol/blob/master/AENS.md). +[æternity naming system](https://github.com/aeternity/protocol/blob/master/AENS.md). For this purpose the [AENS](sophia_stdlib.md#aens) library was exposed. ### Example @@ -713,7 +713,7 @@ field is indexed if it fits in a 32-byte word, i.e. The payload field must be either a string or a byte array of more than 32 bytes. The fields can appear in any order. -*NOTE:* Indexing is not part of the core aeternity node. +*NOTE:* Indexing is not part of the core æternity node. Events are emitted by using the `Chain.event` function. The following function will emit one Event of each kind in the example. @@ -780,4 +780,4 @@ Some chain operations (`Oracle.` and `AENS.`) have an optional delegation signature. This is typically used when a user/accounts would like to allow a contract to act on it's behalf. The exact data to be signed varies for the different operations, but in all cases you should prepend -the signature data with the `network_id` (`ae_mainnet` for the Aeternity mainnet, etc.). \ No newline at end of file +the signature data with the `network_id` (`ae_mainnet` for the æternity mainnet, etc.). \ No newline at end of file diff --git a/docs/sophia_stdlib.md b/docs/sophia_stdlib.md index 0664cbc..de9e37d 100644 --- a/docs/sophia_stdlib.md +++ b/docs/sophia_stdlib.md @@ -483,8 +483,8 @@ It returns `true` iff the oracle query exist and has the expected type. ### AENS -The following functionality is available for interacting with the Aeternity -Naming System (AENS). +The following functionality is available for interacting with the æternity +naming system (AENS). If `owner` is equal to `Contract.address` the signature `signature` is ignored, and can be left out since it is a named argument. Otherwise we need a signature to prove that we are allowed to do AENS operations on behalf of