diff --git a/artifacts/app.wasm b/artifacts/app.wasm new file mode 100644 index 0000000..7ec7b0b Binary files /dev/null and b/artifacts/app.wasm differ diff --git a/artifacts/checksums.txt b/artifacts/checksums.txt index 8e3ac11..dc743aa 100644 --- a/artifacts/checksums.txt +++ b/artifacts/checksums.txt @@ -1 +1 @@ -910e1fb423546a122d71aa44426f2e893861d6e92e4edc4986f585cc2ee06421 app.wasm +69375bfe25a9a18e41b6987f3bb3598365843558ea1c966bf4cc48fa6adaf8fc app.wasm diff --git a/artifacts/checksums_intermediate.txt b/artifacts/checksums_intermediate.txt new file mode 100644 index 0000000..02d9672 --- /dev/null +++ b/artifacts/checksums_intermediate.txt @@ -0,0 +1 @@ +5edc6d889283c7107888a00dfb0103bef6d2b14bae4f9f65494270a89777f1ac /target/wasm32-unknown-unknown/release/app.wasm diff --git a/src/handlers/query.rs b/src/handlers/query.rs index f17babf..4192196 100644 --- a/src/handlers/query.rs +++ b/src/handlers/query.rs @@ -1,11 +1,11 @@ use crate::contract::{App, AppResult}; use crate::msg::{AppQueryMsg, ConfigResponse}; use crate::state::CONFIG; -use cosmwasm_std::{to_binary, Binary, Deps, Env, StdResult}; +use cosmwasm_std::{to_json_binary, Binary, Deps, Env, StdResult}; pub fn query_handler(deps: Deps, _env: Env, _app: &App, msg: AppQueryMsg) -> AppResult { match msg { - AppQueryMsg::Config {} => to_binary(&query_config(deps)?), + AppQueryMsg::Config {} => to_json_binary(&query_config(deps)?), } .map_err(Into::into) } diff --git a/template-setup.sh b/template-setup.sh old mode 100644 new mode 100755 index 971fc85..15854ca --- a/template-setup.sh +++ b/template-setup.sh @@ -2,5 +2,36 @@ mv example.env .env -# Delete this script after running -rm -- "$0" +# Function to prompt for 'y' input +prompt_confirmation() { + local prompt_message="$1" + read -p "$prompt_message (y/n): " -n 1 -r + echo # Move to a new line + [[ $REPLY =~ ^[Yy]$ ]] +} + +# Check if 'just' command is available +if ! command -v just &> /dev/null +then + echo "'just' command not found. ๐Ÿคจ" + + # Ask to install 'just' + if prompt_confirmation "Do you want to install the 'just' command runner?" + then + cargo install just + echo "'just' has been installed." + else + echo "Installation of 'just' cancelled. Can't install tools. โŒ" + exit 0 + fi +fi + +# Ask to install tools using 'just' +if prompt_confirmation "Do you want to install tools (cargo-nextest, taplo-cli, cargo-watch, cargo-limit)?" +then + just install-tools + echo "Tools have been installed! ๐Ÿ‘ท" +else + echo "Tools installation cancelled. โŒ" + exit 0 +fi