Skip to content

Commit

Permalink
fix: greetings -> hello world
Browse files Browse the repository at this point in the history
  • Loading branch information
amessbee committed Jun 3, 2024
1 parent 1e26ba3 commit ca32303
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default defineConfig({
collapsed: true,
items: [
{
text: 'Greetings Smart Contract',
text: 'Hello World Smart Contract',
link: '/guides/zoe/contract-hello',
},
{
Expand Down
4 changes: 2 additions & 2 deletions main/guides/zoe/contract-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This guide is designed to help developers understand how to write smart contract

We provide three core examples to illustrate how to implement various smart contract functionalities:

### 1. Greetings Contract
The **Greetings Contract** demonstrates how to create a simple contract that greets the caller. This example is perfect for understanding the basic structure and syntax of smart contracts. The relevant code is available in [`tut-01-hello` branch](https://github.com/Agoric/dapp-offer-up/tree/tut-01-hello).
### 1. Hello Wolrd Contract
The **Hello World Contract** demonstrates how to create a simple contract that greets the caller. This example is perfect for understanding the basic structure and syntax of smart contracts. The relevant code is available in [`tut-01-hello` branch](https://github.com/Agoric/dapp-offer-up/tree/tut-01-hello).

### 2. State Contract
The **State Contract** shows how to maintain a state or a variable within a smart contract. This is useful for contracts that need to store data or state across transactions. The relevant code is available in [`tut-02-state` branch](https://github.com/Agoric/dapp-offer-up/tree/tut-02-state).
Expand Down
4 changes: 2 additions & 2 deletions main/guides/zoe/contract-hello.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Greetings Smart Contract
# Hello World Smart Contract

Before we look at how to make a contract such as the one in [the
basic dapp](../getting-started/) in the previous section, let's cover some basics by writing a simple contract that returns a greetings message. We will simply call it _hello-world smart contract_.
basic dapp](../getting-started/) in the previous section, let's cover some basics by writing a simple contract that returns a greeting message. We will simply call it _hello-world smart contract_.

A contract is defined by a JavaScript module that exports a `start` function. For our hello-world smart contract, the declaration of `start` function looks like this:

Expand Down
2 changes: 1 addition & 1 deletion main/guides/zoe/contract-state.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# State Smart Contract

In our first `greetings` smart contract, we created a `greet` function and exposed it using `publicFacet` so that it can be remotely called. However, if you notice, there is no state in our smart contract that is preserved between calls. Contracts can use ordinary variables and data structures for state.
In our first `hello-world` smart contract, we created a `greet` function and exposed it using `publicFacet` so that it can be remotely called. However, if you notice, there is no state in our smart contract that is preserved between calls. Contracts can use ordinary variables and data structures for state.

In our second example smart contract, we will manage a list of rooms. We want everyone with access to `publicFacet` to be able to create a new room, and also get current count of rooms. We maintain state using `Map` data structure as below:

Expand Down

0 comments on commit ca32303

Please sign in to comment.