File tree 5 files changed +49
-9
lines changed
5 files changed +49
-9
lines changed Original file line number Diff line number Diff line change 283
283
},
284
284
"ckbtc_index" : {
285
285
"type" : " custom" ,
286
+ "build" : " scripts/build.ckbtc_index.sh" ,
286
287
"candid" : " target/ic/ckbtc_index.did" ,
287
288
"wasm" : " target/ic/ckbtc_index.wasm" ,
289
+ "init_arg_file" : " target/ic/ckbtc_index.args.did" ,
288
290
"specified_id" : " mm444-5iaaa-aaaar-qaabq-cai" ,
289
291
"remote" : {
290
292
"id" : {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ [[ " ${1:- } " != " --help" ]] || {
3
+ cat << -EOF
4
+
5
+ Populates the ckbtc_index init args file.
6
+
7
+ # Prerequisites
8
+ This is expected to be run via dfx, and in particular that
9
+ environment variables provided by dfx are set.
10
+
11
+ EOF
12
+ exit 0
13
+ }
14
+ set -euxo pipefail
15
+
16
+ : START populating the ckbtc_index install args file...
17
+ ARGS_FILE=" $( jq -re .canisters.ckbtc_index.init_arg_file dfx.json) "
18
+ mkdir -p " $( dirname " $ARGS_FILE " ) "
19
+
20
+ cat << EOF >"$ARGS_FILE "
21
+ (opt variant {
22
+ Init = record {
23
+ ledger_id = principal \"$CANISTER_ID_CKBTC_LEDGER \";
24
+ }
25
+ })
26
+ EOF
27
+ : FINISH populating the ckbtc_index install args file.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ [[ " ${1:- } " != " --help" ]] || {
3
+ cat << -EOF
4
+
5
+ Assembles the ckbtc_index canister deploy artefacts.
6
+
7
+ # Prerequisites
8
+ This is expected to be run by dfx. In particular,
9
+ the code that creates the arguments uses environment
10
+ variables set by dfx.
11
+
12
+ EOF
13
+ exit 0
14
+ }
15
+
16
+ set -euo pipefail
17
+
18
+ scripts/download.ckbtc.sh
19
+ scripts/build.ckbtc_index.args.sh
Original file line number Diff line number Diff line change @@ -64,11 +64,7 @@ dfx deploy ckbtc_kyt --specified-id pvm5g-xaaaa-aaaar-qaaia-cai --network "$DFX_
64
64
})"
65
65
66
66
echo " Step 5: deploy index canister..."
67
- dfx deploy ckbtc_index --specified-id mm444-5iaaa-aaaar-qaabq-cai --network " $DFX_NETWORK " --argument " (opt variant {
68
- Init = record {
69
- ledger_id = principal \" $LEDGERID \" ;
70
- }
71
- })"
67
+ dfx deploy ckbtc_index --network " $DFX_NETWORK "
72
68
73
69
# Example to mint ckBTC
74
70
Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ set -euxo pipefail
4
4
dfx canister create --all
5
5
dfx deploy backend
6
6
dfx deploy signer
7
-
8
- mkdir -p ./target/ic
9
-
10
- ./scripts/download.icp.sh
11
7
dfx deploy icp_ledger
12
8
dfx deploy icp_index
13
9
You can’t perform that action at this time.
0 commit comments