Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mint to Contract

We can [`mint`](mint.md) and [`transfer`](../transfer/index.md) the asset to an [`Contract`](../../namespace/contract-id.md).
We can [`mint`](mint.md) and [`transfer`](../transfer/index.md) the asset to a [`Contract`](../../namespace/contract-id.md).

To use the function we must import it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `ContractId` type is a struct containing a value of a `b256` type.
{{#include ../../../code/operations/namespace/src/lib.sw:contract_id}}
```

Casting between an `ContractId` and `b256` can be done in the following way:
Casting between a `ContractId` and `b256` can be done in the following way:

```sway
{{#include ../../../code/operations/namespace/src/lib.sw:contract_id_cast}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In this example we look at how we can retrieve a single value `balance` and how

Writing to storage is similar to [reading](#reading-from-storage). The difference is that we use a different method `.push(value)` and we use the `read` keyword because the implementation reads the length of the vector to determine where to store the value.

In this example we insert a [tuple](../../../language/built-ins/tuples.md) containing an the [`Identity`](../../namespace/identity.md) of the caller and some `id` into the vector.
In this example we insert a [tuple](../../../language/built-ins/tuples.md) containing the [`Identity`](../../namespace/identity.md) of the caller and some `id` into the vector.

```sway
{{#include ../../../../code/operations/storage/storage_vec/src/main.sw:writing_to_storage}}
Expand Down
Loading