Skip to content

Commit

Permalink
Update the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Nov 20, 2024
1 parent 5925939 commit f040425
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,16 @@ traits.
Setup for ULM
-------------

The commands below will not work without the encode/decode ULM hooks,
which are not included by the build commands below.
You must have `ulm` checked out in a sibling directory (i.e. `../ulm`).

"Compiling" the erc-20 contract to bytes:

```sh
make .build/ulm-preprocessing-kompiled/timestamp
compilation/prepare-erc20.sh
Build the semantics:
```
make build-ulm -j3
```

The above will produce a cell containing the full preprocessed contract.

Running the contract requires a different semantics (there main difference from
the above is the setup of the `<k>` cell; there are other small differences, but
they matter less):

```sh
make .build/ulm-execution-kompiled/timestamp
Preprocess and convert a contract to bytes:
```
compilation/prepare-contract.sh \
tests/ulm-contracts/erc_20_token.rs \
.build/compilation/erc_20_token.preprocessed.kore
```
When running the above (say, with `krun`), and calling the constructor
(`$CREATE` is `true`), it expects `CallData()` to contain the initial quantity
to mint and assign to the caller (`u256`). At the end, it will leave the
contract's bytes in the `<k>` cell in a similar way to the `SIMPLE-ulm` example.

0 comments on commit f040425

Please sign in to comment.