Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compiling docs in readme #51

Merged
merged 5 commits into from
Apr 4, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,22 @@ Here are some of the tasks available in the `justfile`:
- `publish {{chain-id}}`: Publish the App to a network.
- `wasm`: Optimize the contract.
- `schema`: Generate the json schemas for the contract
- `ts-codegen`: Generate the typescript client code for the contract
- `ts-publish`: Publish the typescript client code to npm
<!-- - `ts-codegen`: Generate the typescript client code for the contract -->
<!-- - `ts-publish`: Publish the typescript client code to npm -->
- `publish-schemas`: Publish the schemas by creating a PR on the Abstract [schemas](https://github.com/AbstractSDK/schemas) repository.

You can see the full list of tasks available by running `just --list`.

### Compiling

Best to run `cargo update` to have synced versions just in case.

You can compile your module by running the following command:
```sh
just wasm
```
This should result in an artifacts directory being created in your project root. Inside you will find a `my_module.wasm` file that is your module’s binary. Make sure it's the same name as mentioned in `Cargo.toml` file. If not, just edit it to match.
anistark marked this conversation as resolved.
Show resolved Hide resolved

### Testing

You can test the module using the different provided methods.
Expand All @@ -71,7 +81,7 @@ You can now use `just publish {{chain-id}}` to run the [`examples/publish.rs`](.

To publish your module schemas, we provide the `publish-schemas` command, which creates a pull request on the Abstract [schemas](https://github.com/AbstractSDK/schemas) repository.

Please install [github cli](https://cli.github.com/) before proceeding.
Please install [github cli](https://cli.github.com/) before proceeding. Also login and setup your github auth by `gh auth login`. Now, we're ready to proceed.

```bash
just publish-schemas <namespace> <name> <version>
Expand All @@ -88,7 +98,7 @@ For this command to work properly, please make sure that your `metadata.json` fi
Example:

```bash
just publish-schemas my-namespace my-module 0.1
just publish-schemas my-namespace my-module 0.0.1
```

In the example above, `my-namespace` is the namespace, `my-module` is the module's name, and `0.1` is the minor version. If you create a patch for your module (e.g., `0.1.1`), you don't need to run `publish-schemas` again unless the schemas have changed.
Expand Down
Loading