Skip to content

Commit

Permalink
Text updates to Core overview and entrypoints (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 authored Aug 28, 2024
2 parents 5537159 + 9d286a6 commit 2a590b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 6 additions & 1 deletion src/pages/core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { Callout } from "nextra/components";
This chapter will give you an overview over CosmWasm from a contract developer perspective, its
capabilities, and guide you through initializing your first smart contract.

<Callout>We assume you have basic knowledge of Rust and Cargo (its standard build system)</Callout>
<Callout>
We assume you have basic knowledge of Rust and Cargo (Rust's standard build system). If not, have
a look [here](https://www.rust-lang.org/learn/get-started). No worries, you don't need to be a
Rust expert to write your first contract.
</Callout>

## What is CosmWasm?

Expand All @@ -25,6 +29,7 @@ standard library. These primitives include:
- extended precision arithmetic (128, 256, 512-bit integers)
- cryptographic primitives (for example, secp256k1 verification)
- interaction with the Cosmos SDK
- IBC connectivity

## What does CosmWasm _not_ provide?

Expand Down
6 changes: 2 additions & 4 deletions src/pages/core/entrypoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import { Callout } from "nextra/components";
# Entrypoints

Entrypoints are where your contract can be called from the outside world. You can equate that to
your `main` function in C, Rust, Java, etc.
However, there is one _small_ difference: In CosmWasm, you have multiple of these entrypoints, each
one different from the last.
your `main` function in C, Rust, Java, etc. However, there is one _small_ difference: In CosmWasm,
you have multiple of these entrypoints, each one different from the last.

In this section we want to give you a quick overview over all the entrypoints and when they are
called.
Expand Down Expand Up @@ -128,7 +127,6 @@ struct CustomInstantiateMsg {
PartialEq,
schemars::JsonSchema
)]
#[serde(deny_unknown_fields)]
struct CustomInstantiateMsg {
initial_admins: Vec<Addr>,
}
Expand Down
7 changes: 3 additions & 4 deletions src/pages/core/entrypoints/instantiate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import { Callout } from "nextra/components";
# Instantiate

This is one of the most fundamental entrypoints. This entrypoint is called once during the contract
lifecycle.
It essentially is there to initialise the state of your contract (for example, initialising a
counter in storage, etc.).
lifecycle, right after an address has been assigned. It essentially is there to initialise the state
of your contract (for example, initialising a counter in storage, etc.).

You can imagine it as the constructor of your contract.

<Callout>
Note that this function is called for *each instance* of your contract
Note that this function is called for *each instance* of your contract
that you decide to create, not one time ever.

To equate it to OOP, your contract is a *class*, and this is the *constructor*,
Expand Down

0 comments on commit 2a590b6

Please sign in to comment.