Skip to content

Commit 17f2dfc

Browse files
Updated app-template docs (#304)
* updated deploy to publish * updated readme instructions on compiling * removed warning on name of app --------- Co-authored-by: CyberHoward <88450409+CyberHoward@users.noreply.github.com>
1 parent 1c8c475 commit 17f2dfc

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

framework/docs/src/4_get_started/2_installation.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,28 @@ The template contains a scaffold contract that you can use as a starting point f
6161
- `handlers/`: Message handlers that your contract will use to handle the different messages it can receive.
6262

6363
If there's anything you don't understand about the template please don't hesitate to reach out to us on our <a href="https://discord.com/invite/uch3Tq3aym" target="_blank">Discord</a> server.
64+
65+
<!-- ## Front-end layout
66+
67+
To generate the front-end scaffold, you can run `just ts-codegen`, which will run a code generation script for you found in the `typescript/scripts` folder. The code generation script will generate TypeScript code based on the specifications defined in the contract schemas.
68+
69+
Once the script is complete, you will find the newly generated code under `typescript/src`, and it's structured as
70+
follows:
71+
72+
- `index.ts`: Index file bundles and exports all the functionalities from the generated files (Template.types, Template.client, Template.message-composer, Template.msg-builder) under a single namespace called contracts, making it easier to access the various functionalities encapsulated in the other files.
73+
- `Template.client.ts`: Client file contains classes for creating client instances to query and interact with a blockchain module. These client instances can be used to retrieve module configurations or to connect a signing client for transaction functionalities.
74+
- `Template.message-composer.ts`: Aids in crafting messages necessary for interacting with a specific
75+
blockchain contract, particularly for updating configurations. It contains a class that generates message objects that can be sent to the blockchain for execution.
76+
- `Template.msg-builder.ts`: Provides static methods on abstract classes to create message objects for querying or executing actions on the blockchain. It essentially facilitates the building of structured messages for blockchain interactions.
77+
- `Template.types.ts`: Defines various data structures and types that represent the structure of messages and responses within the blockchain module, aiding in maintaining consistency across different operations in the module. -->
78+
79+
## Tools used in the template
80+
81+
The following Rust tools are used extensively in our template to improve your productivity.
82+
83+
- <a href="https://taplo.tamasfe.dev/cli/installation/cargo.html" target="_blank">Taplo</a>: The CI shipped with the template will perform formatting checks. To ensure you pass the checks, you can install Taplo and use the `just format` command to format your code and toml files.
84+
- <a href="https://nexte.st/index.html" target="_blank">Nextest</a>: A better cargo test runner.
85+
- <a href="https://github.com/alopatindev/cargo-limit" target="_blank">Cargo Limit</a>: Prioritizes errors over warnings in compile output as well as some other small improvements.
86+
- <a href="https://crates.io/crates/cargo-watch" target="_blank">Cargo Watch</a>: Allows you to automatically re-run compilation when files change. This is useful when you are working on the contracts and want to fix compiler errors one by one.
87+
88+
You can install them by running `just install-tools`. All the tools are built from the source by Cargo.

framework/docs/src/4_get_started/7_module_deployment.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ network.
1414

1515
### Compiling your module
1616

17+
Once you have confirmed that your module works as expected you can spin up a local node and deploy Abstract + your app onto the chain. You need [Docker](https://www.docker.com/) installed for this step.
18+
1719
You can compile your module by running the following command:
1820

1921
```bash
@@ -25,17 +27,20 @@ $ just wasm
2527
> it from <a href="https://docs.docker.com/get-docker/" target="_blank">here</a>.
2628
2729
This should result in an `artifacts` directory being created in your project root. Inside you will find
28-
a `my_module.wasm` file that is your module's binary.
30+
a `my_module.wasm` file that is your module's binary.
31+
32+
### Publish your module
33+
34+
Before attempting to publish your app you need to add your mnemonic to the `.env` file. **Don't use a mnemonic that has mainnet funds for this.** Make sure this account has funds. If you don't have the deployment will fail. Get funds from respective chain faucets or ask for some test tokens on Abstract Discord.
2935

30-
Now you can go ahead and deploy the module to the network(s) you want to make it available on. You can do this by
31-
running the following command:
36+
Now you can go ahead and publish the module to the network(s) you want to make it available on. You can do this by running the following command:
3237

3338
```bash
34-
$ just deploy uni-1
39+
$ just publish uni-6
3540
> Deploying module...
3641
```
3742

38-
This will use the module's `examples/deploy.rs` script to deploy the module to the `uni-1` network. The resulting
43+
This will use the module's `examples/publish.rs` script to deploy the module to the `uni-1` network. The resulting
3944
code-id of your contract should now be in the `state.json` file created for you. The script will also attempt to
4045
register the module on the Abstract Version Control, hence the mnemonic used in the script should be the same as the one
4146
you used to create the account and register the namespace.

0 commit comments

Comments
 (0)