This repository was archived by the owner on Jun 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdfx_deploy.sh
More file actions
executable file
·93 lines (82 loc) · 2.51 KB
/
Copy pathdfx_deploy.sh
File metadata and controls
executable file
·93 lines (82 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bash
DFX_PRINCIPAL=$(dfx identity get-principal)
if [ "$DFX_PRINCIPAL" = "2vxsx-fae" ]; then
echo "Error: Anonymous identity is not allowed. Please set a valid identity using 'dfx identity use <identity_name>'."
exit 1
fi
dfx canister create ck-btc
CK_BTC_CANISTER_ID=$(dfx canister id ck-btc)
dfx canister create ck-kyt
CK_KYT_CANISTER_ID=$(dfx canister id ck-kyt)
dfx canister create ck-minter
CK_MINTER_CANISTER_ID=$(dfx canister id ck-minter)
dfx canister create cycles-ledger
CYCLES_LEDGER_CANISTER_ID=$(dfx canister id cycles-ledger)
dfx canister create cycle-btc
CYCLE_BTC_CANISTER_ID=$(dfx canister id cycle-btc)
dfx deploy ck-btc --argument '(
variant {
Init = record {
token_symbol = "ckBTC";
token_name = "ChainKey BTC";
transfer_fee = 11_500;
send_whitelist = vec {};
metadata = vec {};
max_memo_length = opt 80;
minting_account = record { owner = principal "'"$CK_MINTER_CANISTER_ID"'" };
initial_balances = vec {};
archive_options = record {
num_blocks_to_archive = 10_000;
trigger_threshold = 20_000;
controller_id = principal "'"$DFX_PRINCIPAL"'" ;
cycles_for_archive_creation = opt 1_000_000_000_000;
max_message_size_bytes = null;
node_max_memory_size_bytes = opt 3_221_225_472;
};
feature_flags = opt record { icrc2 = true };
}
},
)'
dfx deploy ck-kyt --argument '(
variant {
InitArg = record {
minter_id = principal "'"$CK_MINTER_CANISTER_ID"'" ;
maintainers = vec {
principal "'"$DFX_PRINCIPAL"'" ;
};
mode = variant { AcceptAll };
}
}
)'
dfx canister call ck-kyt set_api_key '(record { api_key = "" })'
dfx deploy ck-minter --argument '(
variant {
Init = record {
btc_network = variant { Regtest };
ecdsa_key_name = "dfx_test_key";
retrieve_btc_min_amount = 10_000 : nat64;
ledger_id = principal "'"$CK_BTC_CANISTER_ID"'" ;
max_time_in_queue_nanos = 420_000_000_000 : nat64;
min_confirmations = opt 1;
mode = variant { GeneralAvailability };
kyt_fee = opt 1_333;
kyt_principal = opt principal "'"$CK_KYT_CANISTER_ID"'" ;
}
}
)'
dfx deploy cycles-ledger --argument '(
variant {
Init = record {
max_blocks_per_request = 1000 : nat64;
}
}
)'
dfx deploy cycle-btc --argument '(
record {
network = variant { regtest };
minter_id = principal "'"$CK_MINTER_CANISTER_ID"'" ;
ck_btc_id = principal "'"$CK_BTC_CANISTER_ID"'" ;
cycles_id = principal "'"$CYCLES_LEDGER_CANISTER_ID"'" ;
min_confirmations = 1 : nat32;
}
)'