Skip to content

Commit 78d6ecd

Browse files
authored
docs: update for latest features and system requirements (#205)
* docs: update system requirements * chore: update python version * docs: update docs for latest features
1 parent b70e113 commit 78d6ecd

File tree

5 files changed

+43
-14
lines changed

5 files changed

+43
-14
lines changed

docs/add-contracts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Once you have successfully created your project, you can add contract templates. You first need to navigate to your project's directory and run the following command:
33

44
```
5-
jenesis add contract <TEMPLATE> <CONTRACT NAME>
5+
jenesis add contract <template> <contract_name>
66
```
77
You can find all the contract templates available in [Jenesis Templates](https://github.com/fetchai/jenesis-templates).
88
An example of how to add the template **cw20-base** with the name `my_token` is given below:
@@ -11,9 +11,9 @@ An example of how to add the template **cw20-base** with the name `my_token` is
1111
jenesis add contract cw20-base my_token
1212
```
1313

14-
If you need multiple deployments of the same contract, you can use the `-d` flag to specify multiple deployments and name them.
14+
If you need multiple deployments of the same contract, you can use the `--deployments` or `-d` flag to specify multiple deployments and name them.
1515
```
16-
jenesis add contract <TEMPLATE> <CONTRACT NAME> -d <DEPLOYMENTS>
16+
jenesis add contract <template> <contract_name> [--deployments <deployments>]
1717
```
1818
Jenesis will add the deployments to all profiles for the specified contract.
1919
In the example below, `token_1` and `token_2` deployments have been added. This will allow you to deploy `my_token` contract with two different configurations. You can add as many deployments as you wish.
@@ -112,4 +112,4 @@ To attach the contract, you will need to specify the deployment's name and addre
112112
jenesis attach token_1 fetch18xs97q6h9zgh4sz730a42pp0dqa9sh4eef7eutfkv69q3v2y3x8s72pkua
113113
```
114114

115-
This will add the relevant deployment information into a `jenesis.lock` file and you will now be able to interact with `token_1` using [contract interactions](use-contracts.md)
115+
This will add the relevant deployment information into a `jenesis.lock` file and you will now be able to interact with `token_1` using [contract interactions](use-contracts.md).

docs/compile-contracts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Compile your contracts by running the following command inside your
44
project directory:
55

66
```
7-
jenesis compile
7+
jenesis compile [--optimize] [--rebuild] [--no-log]
88
```
99
This will compile all packages in your project's contracts directory and output the wasm code under the artifacts directory. If using a cargo workspace, jenesis will automatically detect this and the compiled contracts will appear in the `contracts/artifacts/`. Otherwise, they will go to the `artifacts` directory under the individual contracts.
1010

11-
By default, the contracts are simply compiled and not optimized. For an optimized build, use the flag `--optimize` or `-o`. To force a rebuild, use the flag `--rebuild` or `-r`. To show contract compilation logs, use the flag `--log` or `-l`. In case of compilation failure, the logs will show by default.
11+
By default, the contracts are simply compiled and not optimized. For an optimized build, use the flag `--optimize` or `-o`. To force a rebuild, use the flag `--rebuild` or `-r`. To suppress contract compilation logs, use the flag `--no-log`. In case of compilation failure, the logs will show by default.
1212

1313
> *Note: ```jenesis compile``` requires that docker is running and configured with permissions for your user.*

docs/deploy-contracts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ To deploy all the contracts inside a profile you have two options:
99
1. Fill the `deployer_key` field for each contract inside the `jenesis.toml` file (keys can be different for each contract) and run the following command:
1010

1111
```
12-
jenesis deploy --profile profile_name
12+
jenesis deploy [--profile profile_name]
1313
```
1414
Each contract inside the specified profile will be deployed with the specified key.
1515

1616
2. Simply specify a certain key as an argument of the deploy command:
1717

1818
```
19-
jenesis deploy key_name --profile profile_name
19+
jenesis deploy key_name [--profile profile_name]
2020
```
2121

2222
The `deployer_key` field will be ignored in this case and all contracts inside the specified profile will be deployed using the key `key_name`.

docs/index.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1+
# Introduction
2+
13
Jenesis is a command line tool for rapid contract and service development for the Fetch.ai blockchain ecosystem and other CosmWasm-enabled blockchains.
24

5+
# System Requirements
6+
7+
Jenesis currently requires:
8+
- OS: Linux, MacOS
9+
- Python: 3.8 to 3.10
10+
- Docker: 20.10.22 or higher recommended
11+
- git: Any
12+
313
# Installation
414

5-
Install jenesis for Python 3.7 or newer via PyPI:
15+
Install via PyPI:
616

717
```
818
pip install jenesis
919
```
1020

11-
# Getting Started
21+
# Getting started
1222
There are multiple commands integrated into jenesis that allow you to perform a variety of tasks these commands are:
1323

1424
- `new`
@@ -26,10 +36,10 @@ There are multiple commands integrated into jenesis that allow you to perform a
2636
## Create a new project
2737
Create a project using the ```new``` command
2838
```
29-
jenesis new my_project --profile my_profile
39+
jenesis new my_project [--profile my_profile] [--network network_name]
3040
```
3141

32-
This will create a new directory called `my_project`. You can use `--profile` and `--network` optional arguments, when they aren't used, profile and network will be set to `testing` and `fetchai-testnet` respectively. Inside this directory a `jenesis.toml` file will be created containing the following information:
42+
This will create a new directory called `my_project`. You can use `--profile` and `--network` optional arguments; when they aren't used, profile and network will be set to `testing` and `fetchai-testnet` respectively. Inside this directory a `jenesis.toml` file will be created containing the following information:
3343

3444
```toml
3545
[project]
@@ -60,7 +70,7 @@ An empty `contracts` folder will also be created inside `my_project` directory t
6070
The ```init``` command is similar to the ```new``` command, but in this case, you won't need a project name argument since this command is intended to run inside an existing project directory.
6171

6272
```
63-
jenesis init
73+
jenesis init [--profile my_profile] [--network network_name]
6474
```
6575

6676
This command will create the same files and folders inside your project directory as the ones described for the ```new``` command.
@@ -98,6 +108,8 @@ mnemonic = "gap bomb bulk border original scare assault pelican resemble found l
98108
password = "12345678"
99109
moniker = "test-node"
100110
genesis_accounts = [ "fetch1vas6cc9650z0s08230ytqjphgzl5tcq9crqhhu",]
111+
timeout_commit = "5s"
112+
debug_trace = true
101113
```
102114
In particular, to fund some accounts for testing, replace the `genesis_accounts`
103115
field with the addresses to be funded.
@@ -106,4 +118,16 @@ When running any of the commands `deploy`, `run`, `shell`, and `attach`,
106118
jenesis will check for a currently running local node, and if there is none, a new one will be created in a docker container.
107119
If you wish to keep a local node running, you need to set the `keep_running` parameter to `true`. Otherwise, nodes will be stopped after any of the command mentioned above finish running.
108120

109-
At any time, you can start or stop a local node by running `jenesis network start/stop --profile <PROFILE>`
121+
At any time, you can start or stop a local node by running:
122+
```
123+
jenesis network start [--profile my_profile]
124+
```
125+
or
126+
```
127+
jenesis network stop [--profile my_profile]
128+
```
129+
130+
To view the logs from the local node, run:
131+
```
132+
jenesis network logs [--profile my_profile]
133+
```

docs/use-contracts.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,9 @@ jenesis run script.py
147147

148148
And you will observe the same output as before. You can also specify the profile as an optional argument using `--profile`.
149149

150+
Finally, you can pass arguments to the script just as you would to a standard python script by placing all the arguments to the script after the `--` delimiter:
151+
```
152+
jenesis run script.py [--profile profile_name] -- arg1 arg2 --key1 value1 --key2 value2
153+
```
154+
150155
You can visit [CosmPy](https://docs.fetch.ai/CosmPy/) for more contract interaction examples.

0 commit comments

Comments
 (0)