-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -u | ||
[ -n "${DEBUG:-}" ] && set -x || true | ||
|
||
if ! [ -e build/release/dao-action-verifier ]; then | ||
echo "Expect the contract files in build/release" >&2 | ||
echo "Run \`make contract\` to build them" >&2 | ||
exit 1 | ||
fi | ||
|
||
export API_URL="https://testnet.ckbapp.dev/" | ||
export CKB_CHAIN="testnet" | ||
|
||
function deploy() { | ||
local DEPLOY_NAME="$1" | ||
local MIGRATION_DIR="migrations/$DEPLOY_NAME-$CKB_CHAIN" | ||
local INFO_FILE="$MIGRATION_DIR/deployment.json" | ||
local CONFIG_FILE="migrations/templates/$DEPLOY_NAME.toml" | ||
|
||
mkdir -p "$MIGRATION_DIR" | ||
|
||
if ! [ -f "$INFO_FILE" ]; then | ||
ckb-cli deploy gen-txs --from-address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsq0yv0tufjegg4an5tmnt5we92t3kr66w5gs8833u \ | ||
--fee-rate 1000 --deployment-config "$CONFIG_FILE" --info-file "$INFO_FILE" --migration-dir "$MIGRATION_DIR" | ||
fi | ||
|
||
ckb-cli deploy sign-txs --add-signatures --info-file "$INFO_FILE" --from-account 0xe463d7c4cb28457b3a2f735d1d92a971b0f5a751 --output-format json | sed -n 's/: \("[^"]*"\)/: [\1]/p' | ||
|
||
ckb-cli deploy apply-txs --info-file "$INFO_FILE" --migration-dir "$MIGRATION_DIR" | ||
|
||
rm -f "$INFO_FILE" | ||
} | ||
|
||
deploy dao-action-verifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
migrations/dao-action-verifier-testnet/2024-02-18-082928.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"cell_recipes": [ | ||
{ | ||
"name": "dao-action-verifier", | ||
"tx_hash": "0x4a16eb60719c2c091eafb5a30c9e9b722bd287531ba189bd7de46bce872c6499", | ||
"index": 0, | ||
"occupied_capacity": 15686200000000, | ||
"data_hash": "0x019de71c1a480e4acf472d07c9011a2437eda719b10716c8dfa7725b8a6f2958", | ||
"type_id": "0xf9788b3ae2d4a328281281ae401c0b38401b468d01e1d9316edacc6367aa7176" | ||
} | ||
], | ||
"dep_group_recipes": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters