Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • dan0196/ligo
  • ligolang/ligo
  • maht0rz/ligo
  • JD-P/ligo
  • governancy/ligo
  • renovatorruler/ligo
  • dailambda/ligo
  • jevonearth/ligo
  • mbykovskyy_ecadlabs/ligo
  • opt9/ligo
  • arvidnl/ligo
  • jpic/ligo
  • juztin/ligo
  • steakandbake/ligo
  • mark-o-robson/ligo
  • simon138/ligo
  • nmangan/ligo
  • edmondlee/ligo
  • technomad21c/ligo
  • diogo.machado/ligo
  • kkirka/ligo
  • nobrakal/ligo
  • roxane3/ligo
  • GImbrailo/ligo
  • syuhei176/ligo
  • mjgajda/ligo
  • sanityinc/ligo
  • molllyn1/ligo
  • ulrikstrid/ligo
  • prometheansacrifice/ligo
  • nicolas.van.phan/ligo
  • ryujh21h/ligo
  • rishabhkeshan/ligo
  • amitcz/ligo
  • jobjo/ligo
  • deryyy/ligo
  • my8bit/ligo
  • daachi/ligo
  • elmorg/ligo
  • a.kumar4/ligo
  • dheavy/ligo
  • konchunas/ligo
  • ggichuru.dev/ligo
  • steven_j/ligo
  • arguiot/ligo
  • digitea00/ligo
  • melwyn95/ligo
  • chrispinnock/ligo
  • clarus1/ligo
  • patrickferris/ligo
  • caaatisgood/ligo
  • karoshibee/ligo-kbee
  • arguil/ligo
  • benjamin.fuentes/ligo
  • Dayveed117/ligo
  • timothymcmackin/ligo
  • shubham-kumar/ligo
  • bfamchon1/ligo
  • mavryk-network/ligo
  • int-index/ligo
60 results
Show changes
Commits on Source (136)
Showing
with 157 additions and 36 deletions
LAST_TAG_JOB_ID: 2563037588
LAST_STABLE_VERSION: 0.42.1
LAST_TAG_JOB_ID: 2632723176
LAST_STABLE_VERSION: 0.43.0
......@@ -76,6 +76,7 @@ FROM esydev/esy:nightly-alpine as esy
FROM alpine:3.12
COPY --from=esy . .
WORKDIR /root/
RUN chmod 755 /root # so non-root users inside container can see and execute /root/ligo
COPY --from=0 /tmp/ligo /root/ligo
COPY --from=0 /ligo/_build/default/_doc/_html /root/doc
COPY --from=0 /ligo/coverage /root/coverage
......
author: er433
description: ''
merge_request: '1792'
title: Change `%external` replacement
type: internal
author: melwyn95
description: '### Improve pattern matching anomaly (missing case / redundant case)
error messages.\n##### For missing cases:\n```ocaml\ntype p = Four | Five | Six\ntype
t = One of { a : int ; b : p } | Two | Three\n\nlet s (x : t) = \n match x with\n
One { a ; b = Six } -> ()\n | Two -> ()\n | Three -> ()\n```\nError:\n```ocaml\n
File \"../../test/contracts/negative//pattern_matching_anomalies/missing_cases/c_r_c.mligo\",
line 5, character 2 to line 8, character 29:\n 4 | let s (x : t) =\n 5 | match x
with\n 6 | One { a ; b = Six } -> ()\n 7 | | Two -> ()\n 8 | | Three -> ()\n\n Error
: this pattern-matching is not exhaustive.\n Here are examples of cases that are
not matched:\n - One({ a = _ ; b = Five })\n - One({ a = _ ; b = Four })\n```\n---\n#####
For redundant case:\n```ocaml\ntype t = One of int | Two of nat | Three\n\nlet s
(x : t) = \n match x with\n One a -> ()\n | Two c -> ()\n | Three -> ()\n | _ ->
()\n```\nError:\n```ocaml\nFile \"../../test/contracts/negative//pattern_matching_anomalies/redundant_case/c1_c2_c3_w.mligo\",
line 8, characters 4-5:\n 7 | | Three -> ()\n 8 | | _ -> ()\n\n Error : this match
case is unused\n```'
merge_request: '1794'
title: 'Pattern Matching: anomaly detection'
type: changed
author: er433
description: ''
merge_request: '1805'
title: 'Custom JSON output for types `bool` and `option`'
type: fixed
author: er433
description: '### New functions: `Test.print`, `Test.println`, `Test.eprint`, `Test.to_string`,
`Test.nl` and `Test.chr`\n\nThese new functions provide more fine-grained printing.\n\n`val
Test.print : string -> unit` : prints an string to stdout.\n\n`val Test.println
: string -> unit` : prints an string to stdout, adding a newline at the end.\n\n`val
Test.eprint : string -> unit` : prints an string to stderr.\n\n`val Test.to_string
: ''a -> string` : turns a value of a given type into a `string` (internally using
the same conversion as `Test.log`)\n\n`val Test.nl : string` : a string containing
only a newline.\n\n`Test.chr : nat -> string option` : turns a nat in the range
[0, 255] to an string consisting of only the corresponding char.'
merge_request: '1809'
title: 'Testing framework: separate `Test.log` into printing and string conversion'
type: added
author: tomjack
description: '### Docker image: ligo now executable by non-root users inside container
(e.g. when running docker with `-u $(id -u):$(id -g)`.)'
merge_request: '1810'
title: 'Docker image: make ligo executable for non-root users'
type: fixed
author: er433
description: ''
merge_request: '1811'
title: 'Testing framework: keep order on bigmap receipts'
type: fixed
......@@ -538,6 +538,90 @@ let log = (a: 'a) => unit
</SyntaxTitle>
Log a value.
<SyntaxTitle syntax="pascaligo">
val to_string&lt;a&gt; : a -> string
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val to_string : 'a -> string
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let to_string: 'a => string
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let to_string = (a: 'a) => string
</SyntaxTitle>
Convert a value to a string (same conversion as used by `log`).
<SyntaxTitle syntax="pascaligo">
val print : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val print : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let print: string => unit
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let print = (s: string) => unit
</SyntaxTitle>
Prints an string to stdout.
<SyntaxTitle syntax="pascaligo">
val println : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val println : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let println: string => unit
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let println = (s: string) => unit
</SyntaxTitle>
Prints an string to stdout, ended with a newline.
<SyntaxTitle syntax="pascaligo">
val eprint : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val eprint : string -> unit
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let eprint: string => unit
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let eprint = (s: string) => unit
</SyntaxTitle>
Prints an string to stderr.
<SyntaxTitle syntax="pascaligo">
val nl : string
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val nl : string
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let nl: string
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let nl : string
</SyntaxTitle>
String consisting of only a newline.
<SyntaxTitle syntax="pascaligo">
val chr : nat -> option string
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val chr : nat -> string option
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let chr: nat => option (string)
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let chr = (c: nat) => option&lt;string&gt;
</SyntaxTitle>
String consisting of the character represented by a `nat` in the interval [0, 255].
<SyntaxTitle syntax="pascaligo">
val reset_state : nat -> list (tez) -> unit
</SyntaxTitle>
......@@ -577,13 +661,13 @@ let reset_state_at = (initial_timestamp : timestamp, no_of_accounts: nat, amount
Same as `reset_state` but accepts a timestamp which is set as the initial timestamp of the genesis block.
<SyntaxTitle syntax="pascaligo">
val baker_account : (string * key) -> tez option -> unit
val baker_account : (string * key) -> option tez -> unit
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val baker_account : (string * key) -> tez option -> unit
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
let baker_account: ((string, key), tez option) => unit
let baker_account: ((string, key), option(tez)) => unit
</SyntaxTitle>
<SyntaxTitle syntax="jsligo">
let baker_account = ([string, key], amount : option&lt;tez&gt;) => unit
......
---
id: operators
title: Operators
---
## Available Operators
> This list is non-exhaustive. More operators will be added in
> upcoming LIGO releases.
|Michelson |Pascaligo |Description |
|--- |--- |--- |
| `SENDER` | `Tezos.sender` | Address that initiated the current transaction
| `SOURCE` | `Tezos.source` | Address that initiated the transaction, which triggered the current transaction. (useful e.g. when there's a transaction sent by another contract)
| `AMOUNT` | `Tezos.amount` | Amount of tez sent by the transaction that invoked the contract
| `NOW` | `Tezos.now` | Timestamp of the block whose validation triggered execution of the contract, i.e. current time when the contract is run.
......@@ -10,26 +10,26 @@ You can also try LIGO in a Gitpod environment
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://gitlab.com/ligolang/template-ligo)
## Dockerised installation (recommended)
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.44.0](./changelog.md):
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.45.0](./changelog.md):
Linux or OSX:
> ```sh
> docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.44.0
> docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.45.0
> ```
> For convenience you can alias the above command
> ```sh
> alias ligo="docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.44.0"
> alias ligo="docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.45.0"
> ```
> To make this `alias` persistent across terminal sessions you need to configure your shell.
> Here is a [good link](https://www.tecmint.com/create-alias-in-linux/) with the steps on how to do that.
Windows:
> ```dos
> docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.44.0`
> docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.45.0`
> ```
> For convenience you can alias the above command
> ```dos
> doskey ligo=docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.44.0 $*
> doskey ligo=docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.45.0 $*
> ```
> To make the alias persistent across terminal sessions you need to add the `doskey` to the Windows Registry.
> Follow [this stackoverflow answer](https://stackoverflow.com/a/21040825) for the steps on how to do that.
......@@ -42,10 +42,10 @@ Or run one of the older versions found on [DockerHub](https://hub.docker.com/r/l
The `ligo` executable is statically linked. It should run on most modern Linux distributions.
You can get the rolling release [here](https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo), make it executable, and you are done!
You can get the rolling release [here](https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo), make it executable, and you are done!
```zsh
wget https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo
wget https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo
chmod +x ./ligo
```
......@@ -59,7 +59,7 @@ sudo cp ./ligo /usr/local/bin
## Debian Linux package installation
A `.deb` package containing the static `ligo` executable is also available.
First, download [the package](https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo.deb), and then install using:
First, download [the package](https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo.deb), and then install using:
```zsh
sudo apt install ./ligo.deb
......
......@@ -10,26 +10,26 @@ You can also try LIGO in a Gitpod environment
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://gitlab.com/ligolang/template-ligo)
## Dockerised installation (recommended)
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.44.0](./changelog.md):
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.45.0](./changelog.md):
Linux or OSX:
> ```sh
> docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.44.0
> docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.45.0
> ```
> For convenience you can alias the above command
> ```sh
> alias ligo="docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.44.0"
> alias ligo="docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.45.0"
> ```
> To make this `alias` persistent across terminal sessions you need to configure your shell.
> Here is a [good link](https://www.tecmint.com/create-alias-in-linux/) with the steps on how to do that.
Windows:
> ```dos
> docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.44.0`
> docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.45.0`
> ```
> For convenience you can alias the above command
> ```dos
> doskey ligo=docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.44.0 $*
> doskey ligo=docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.45.0 $*
> ```
> To make the alias persistent across terminal sessions you need to add the `doskey` to the Windows Registry.
> Follow [this stackoverflow answer](https://stackoverflow.com/a/21040825) for the steps on how to do that.
......@@ -42,10 +42,10 @@ Or run one of the older versions found on [DockerHub](https://hub.docker.com/r/l
The `ligo` executable is statically linked. It should run on most modern Linux distributions.
You can get the rolling release [here](https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo), make it executable, and you are done!
You can get the rolling release [here](https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo), make it executable, and you are done!
```zsh
wget https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo
wget https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo
chmod +x ./ligo
```
......@@ -59,7 +59,7 @@ sudo cp ./ligo /usr/local/bin
## Debian Linux package installation
A `.deb` package containing the static `ligo` executable is also available.
First, download [the package](https://gitlab.com/ligolang/ligo/-/jobs/2563037588/artifacts/raw/ligo.deb), and then install using:
First, download [the package](https://gitlab.com/ligolang/ligo/-/jobs/2632723176/artifacts/raw/ligo.deb), and then install using:
```zsh
sudo apt install ./ligo.deb
......