diff --git a/README.md b/README.md index c07c2d7..8b5c678 100644 --- a/README.md +++ b/README.md @@ -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 + + - `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. + ### Testing You can test the module using the different provided methods. @@ -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 @@ -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. diff --git a/justfile b/justfile index bcfdc9f..73c7d6c 100644 --- a/justfile +++ b/justfile @@ -121,4 +121,12 @@ run-script script +CHAINS: cargo run --example {{script}} --features="daemon" -- --network-ids {{CHAINS}} publish +CHAINS: + #!/usr/bin/env bash + set -euxo pipefail + + if [ -d "artifacts" ]; then + echo "Build found ✅"; + else + just wasm + fi just run-script publish {{CHAINS}}