Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(devx): edit getting-started > your first dApp #1579

Merged
merged 8 commits into from
Aug 26, 2024
3 changes: 3 additions & 0 deletions docs/content/_snippets/testing-cheat-sheet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Use [`iota::test_scenario`](https://github.com/iotaledger/iota/blob/develop/crates/iota-framework/packages/iota-framework/sources/test/test_scenario.move) to mimic multi-transaction, multi-sender test scenarios.
- Use the [`iota::test_utils`](https://github.com/iotaledger/iota/blob/develop/crates/iota-framework/packages/iota-framework/sources/test/test_utils.move) module for better test error messages via `assert_eq`, debug printing via `print`, and test-only destruction via `destroy`.
- Use `iota move test --coverage` to compute code coverage information for your tests, and `iota move coverage source --module <name>` to see uncovered lines highlighted in red. Push coverage all the way to 100% if feasible.
5 changes: 2 additions & 3 deletions docs/content/developer/dev-cheat-sheet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: IOTA Developer Cheat Sheet
sidebar_label: Dev Cheat Sheet
---
import TestingCheatSheet from "../_snippets/testing-cheat-sheet.mdx";

Quick reference on best practices for IOTA Network developers.

Expand All @@ -28,9 +29,7 @@ Quick reference on best practices for IOTA Network developers.

### Testing

- Use [`iota::test_scenario`](https://github.com/iotaledger/iota/blob/develop/crates/iota-framework/packages/iota-framework/sources/test/test_scenario.move) to mimic multi-transaction, multi-sender test scenarios.
- Use the [`iota::test_utils`](https://github.com/iotaledger/iota/blob/develop/crates/iota-framework/packages/iota-framework/sources/test/test_utils.move) module for better test error messages via `assert_eq`, debug printing via `print`, and test-only destruction via `destroy`.
- Use `iota move test --coverage` to compute code coverage information for your tests, and `iota move coverage source --module <name>` to see uncovered lines highlighted in red. Push coverage all the way to 100% if feasible.
<TestingCheatSheet />

## Apps

Expand Down
2 changes: 1 addition & 1 deletion docs/content/developer/developer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Go to [Getting Started](getting-started/getting-started.mdx).

If you prefer to jump right in to coding (after installing IOTA, of course), then the Your First dApp is the place for you. These topics show you how to work with Move packages and get them published on-chain.

Go to [Your First IOTA dApp](getting-started/first-app/first-app.mdx).
Go to [Your First IOTA dApp](getting-started/create-a-package.mdx).

## IOTA 101

Expand Down
2 changes: 1 addition & 1 deletion docs/content/developer/evm-to-move/creating-token.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module examples::exampletoken {

There's a lot to unpack here; let's look at it piece by piece. In IOTA Move, there is no 'compiler version' defined within the module itself, like in Solidity.

A `module` is defined (`exampletoken`) as part of the `examples` package (modules always reside in packages; a package can have one or more modules in one file or spread out over several files). Within the `module,` we first alias the functionality we wish to use from other modules with `use.` If you don't do this, you would have to explicitly call other modules through their full package path, which would be very verbose and cumbersome. We import an `option` module from the `std` package and some modules from the `iota` package. The `std` and `iota` names are actually mappings as well to other modules defined in the `Move.toml` file of the package as described in the [documentation](../getting-started/first-app/write-package.mdx).
A `module` is defined (`exampletoken`) as part of the `examples` package (modules always reside in packages; a package can have one or more modules in one file or spread out over several files). Within the `module,` we first alias the functionality we wish to use from other modules with `use.` If you don't do this, you would have to explicitly call other modules through their full package path, which would be very verbose and cumbersome. We import an `option` module from the `std` package and some modules from the `iota` package. The `std` and `iota` names are actually mappings as well to other modules defined in the `Move.toml` file of the package as described in the [documentation](../getting-started/create-a-package.mdx).

After the aliases, we see an empty struct defined:

Expand Down
Empty file.
Loading
Loading