Skip to content

Commit

Permalink
Merge pull request #34 from AbstractSDK/update_setup_script
Browse files Browse the repository at this point in the history
Update setup script and fix clippy
  • Loading branch information
CyberHoward authored Nov 13, 2023
2 parents ec7b471 + 74384a9 commit 4049f47
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
Binary file added artifacts/app.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
910e1fb423546a122d71aa44426f2e893861d6e92e4edc4986f585cc2ee06421 app.wasm
69375bfe25a9a18e41b6987f3bb3598365843558ea1c966bf4cc48fa6adaf8fc app.wasm
1 change: 1 addition & 0 deletions artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5edc6d889283c7107888a00dfb0103bef6d2b14bae4f9f65494270a89777f1ac /target/wasm32-unknown-unknown/release/app.wasm
4 changes: 2 additions & 2 deletions src/handlers/query.rs
Original file line number Diff line number Diff line change
@@ -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<Binary> {
match msg {
AppQueryMsg::Config {} => to_binary(&query_config(deps)?),
AppQueryMsg::Config {} => to_json_binary(&query_config(deps)?),
}
.map_err(Into::into)
}
Expand Down
35 changes: 33 additions & 2 deletions template-setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4049f47

Please sign in to comment.