You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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>
Copy file name to clipboardExpand all lines: framework/docs/src/4_get_started/2_installation.md
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,3 +61,28 @@ The template contains a scaffold contract that you can use as a starting point f
61
61
-`handlers/`: Message handlers that your contract will use to handle the different messages it can receive.
62
62
63
63
If there's anything you don't understand about the template please don't hesitate to reach out to us on our <ahref="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
+
- <ahref="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
+
- <ahref="https://nexte.st/index.html"target="_blank">Nextest</a>: A better cargo test runner.
85
+
- <ahref="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
+
- <ahref="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.
Copy file name to clipboardExpand all lines: framework/docs/src/4_get_started/7_module_deployment.md
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ network.
14
14
15
15
### Compiling your module
16
16
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
+
17
19
You can compile your module by running the following command:
18
20
19
21
```bash
@@ -25,17 +27,20 @@ $ just wasm
25
27
> it from <ahref="https://docs.docker.com/get-docker/"target="_blank">here</a>.
26
28
27
29
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.
29
35
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:
32
37
33
38
```bash
34
-
$ just deploy uni-1
39
+
$ just publish uni-6
35
40
> Deploying module...
36
41
```
37
42
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
39
44
code-id of your contract should now be in the `state.json` file created for you. The script will also attempt to
40
45
register the module on the Abstract Version Control, hence the mnemonic used in the script should be the same as the one
41
46
you used to create the account and register the namespace.
0 commit comments