diff --git a/checksum b/checksum index f4b34c56..f311d653 100644 --- a/checksum +++ b/checksum @@ -1,2 +1,2 @@ -14994ed3c237597f9ece434ce72387cd04525ff5b27a90909f9d881cae4d96db cw_croncat.wasm +e841b8f67c8209ade26674edd432bb1d7dc9dcaa470651ebf379c62d41c294c8 cw_croncat.wasm de2d1a0c648e41760020dd261f818da085c358240059acf85128f60eb0e05db2 cw_rules.wasm diff --git a/contracts/cw-croncat/src/contract.rs b/contracts/cw-croncat/src/contract.rs index e05a3cf2..62efb809 100644 --- a/contracts/cw-croncat/src/contract.rs +++ b/contracts/cw-croncat/src/contract.rs @@ -201,7 +201,6 @@ impl<'a> CwCroncat<'a> { to_binary(&self.query_get_tasks_by_owner(deps, owner_id)?) } QueryMsg::GetTask { task_hash } => to_binary(&self.query_get_task(deps, task_hash)?), - QueryMsg::GetTaskHash { task } => to_binary(&self.query_get_task_hash(*task)?), QueryMsg::ValidateInterval { interval } => { to_binary(&self.query_validate_interval(interval)?) } @@ -213,6 +212,7 @@ impl<'a> CwCroncat<'a> { QueryMsg::GetState { from_index, limit } => { to_binary(&self.get_state(deps, env, from_index, limit)?) } + QueryMsg::GetTaskHash { task } => to_binary(&self.query_get_task_hash(*task)?), } } diff --git a/contracts/cw-croncat/src/tasks.rs b/contracts/cw-croncat/src/tasks.rs index fa95c72f..9d2769ae 100644 --- a/contracts/cw-croncat/src/tasks.rs +++ b/contracts/cw-croncat/src/tasks.rs @@ -411,6 +411,7 @@ impl<'a> CwCroncat<'a> { }; Ok(Response::new() + .set_data(hash.as_bytes()) .add_attribute("method", "create_task") .add_attribute("slot_id", next_id.to_string()) .add_attribute("slot_kind", format!("{:?}", slot_kind)) diff --git a/justfile b/justfile index 315885e4..3acd01b8 100644 --- a/justfile +++ b/justfile @@ -1,17 +1,31 @@ test_addrs := env_var_or_default('TEST_ADDR', `jq -r '.[].address' ci/test_accounts.json | tr '\n' ' '`) set export check: - cargo fmt && cargo clippy -- -D warnings + cargo fmt --all && cargo clippy -- -D warnings test: - ./scripts/test.sh + #!/bin/bash + set -e + export RUSTFLAGS='-C link-arg=-s' + cargo unit-test + cargo wasm build: - ./scripts/build.sh + #!/bin/bash + cargo build --release --lib --target wasm32-unknown-unknown deploy: ./scripts/uni-testnet/start.sh -c -w checksum: - ./scripts/update-checksum.sh + #!/bin/bash + cat artifacts/checksums.txt | grep -e cw_croncat.wasm -e cw_rules.wasm > checksum schema: - ./scripts/schema.sh + #!/bin/bash + set -e + cargo run --example schema + cargo run --example rules_schema +gen: + #!/usr/bin/env bash + cd typescript + yarn --cwd ./typescript install --frozen-lockfile + yarn --cwd ./typescript codegen juno-local: docker kill cosmwasm || true docker volume rm -f junod_data @@ -40,6 +54,9 @@ download-deps: wget https://github.com/CosmWasm/cw-plus/releases/latest/download/cw20_base.wasm -O artifacts/cw20_base.wasm # TODO?: test dao-contracts +all: build test check schema gen optimize checksum + #!/usr/bin/env bash + gas-benchmark: juno-local download-deps optimize #!/usr/bin/env bash sleep 1