Skip to content

Commit

Permalink
Merge pull request #216 from CronCats/create-task-reply-data
Browse files Browse the repository at this point in the history
[FIX]: create_task response data
  • Loading branch information
d3v3us authored Dec 17, 2022
2 parents d302d77 + 0795183 commit 76c05d8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion checksum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
14994ed3c237597f9ece434ce72387cd04525ff5b27a90909f9d881cae4d96db cw_croncat.wasm
e841b8f67c8209ade26674edd432bb1d7dc9dcaa470651ebf379c62d41c294c8 cw_croncat.wasm
de2d1a0c648e41760020dd261f818da085c358240059acf85128f60eb0e05db2 cw_rules.wasm
2 changes: 1 addition & 1 deletion contracts/cw-croncat/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?)
}
Expand All @@ -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)?),
}
}

Expand Down
1 change: 1 addition & 0 deletions contracts/cw-croncat/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
27 changes: 22 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 76c05d8

Please sign in to comment.