Skip to content

Commit

Permalink
Add back a brief explanation about the imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ipopescu committed Mar 12, 2024
1 parent f066112 commit e54f51b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/tutorials/getting-started/full-installation-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Information on the modalities used throughout this installation process can be f
- [Prerequisites](#prerequisites)
- [Building the Contract and Tests](#building-the-contract-and-tests)
2. [Reviewing the Contract Implementation](#reviewing-the-contract-implementation)
- [Required Crates](#required-crates)
- [Crates and Modules](#crates-and-modules)
- [Initialization Flow](#Initialization-flow)
- [Contract Entrypoints](#contract-entrypoints)
3. [Installing the Contract](#installing-the-contract)
Expand Down Expand Up @@ -74,6 +74,22 @@ There are four steps to follow when you intend to create your implementation of
3. Compile the customized code to Wasm.
4. Send the customized Wasm as a deploy to a Casper network.

### Crates and Modules

The contract implementation starts by importing the following essential Casper crates:

- [casper_contract](https://docs.rs/casper-contract/latest/casper_contract/index.html) - A Rust library for writing smart contracts on Casper networks
- [casper_types](https://docs.rs/casper-types/latest/casper_types/) - Types used to allow the creation of Wasm contracts and tests for use on Casper networks

The contract code defines additional modules in the `contract/src` folder:

- `constants` - Constant values required to run the contract code
- `error` - Errors related to the NFT contract
- `events` - A library for contract-emitted events
- `metadata` - A module handling the contract's metadata and corresponding dictionary
- `modalities` - Common expectations around contract usage and behavior
- `utils` - Utility and helper functions to run the contract code

### Initialization Flow

Initializing the contract happens through the `call() -> install_contract() -> init()` functions inside the [main.rs](../../../contract/src/main.rs) contract file. The `init()` function reads the runtime arguments and defines parameters such as `collection_name`, `collection_symbol`, and `total_token_supply`, among the other required and optional arguments described in the [README](../../../README.md#required-runtime-arguments).
Expand Down

0 comments on commit e54f51b

Please sign in to comment.