-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add just recipes for deploying and store contracts #276
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
- Coverage 94.46% 94.45% -0.02%
==========================================
Files 219 219
Lines 24858 24862 +4
==========================================
+ Hits 23482 23483 +1
- Misses 1376 1379 +3 ☔ View full report in Codecov by Sentry. |
local code_id=$(echo $res | jq -r '.logs[0].events[] | select(.type == "store_code").attributes[] | select(.key == "code_id").value') | ||
local res=$($BINARY tx wasm store $artifact $TXFLAG --from $deployer | jq -r '.txhash') | ||
sleep $tx_delay | ||
local code_id=$($BINARY q tx $res --node $RPC -o json | jq -r '.logs[0].events[] | select(.type == "store_code").attributes[] | select(.key == "code_id").value') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now since we use the flag sync, we can't just read directly from res but rather query the tx and parse from there.
@@ -48,7 +49,7 @@ function store_artifact_on_chain() { | |||
|
|||
# Write code_id in output file | |||
tmpfile=$(mktemp) | |||
jq --arg artifact $(basename "$artifact") --arg code_id $code_id --arg version $version '.contracts += [{wasm: $artifact, code_id: $code_id, version: $version}]' $output_file >$tmpfile | |||
jq --arg artifact "$(basename "$artifact")" --arg code_id "$code_id" --arg version "$version" '.contracts += [{"wasm": $artifact, "code_id": $code_id, "version": $version}]' "$output_file" >"$tmpfile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unix quotes yada yada
@@ -3,7 +3,7 @@ set -e | |||
|
|||
deployment_script_dir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P) | |||
project_root_path=$(realpath "$0" | sed 's|\(.*\)/.*|\1|' | cd ../ | pwd) | |||
tx_delay=8 | |||
tx_delay=14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 seconds was too aggresive, was getting sequence missmatch sometimes
23847d3
to
da55e32
Compare
…le with other scripts
Description and Motivation
This PR adds just recipes for deploy and store artifacts on chain.
Related Issues
Checklist:
Update index.md
)cargo fmt --all --
.cargo clippy -- -D warnings
.cargo schema
.