-
Notifications
You must be signed in to change notification settings - Fork 0
/
initialize.sh
executable file
·48 lines (43 loc) · 1.39 KB
/
initialize.sh
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
#!/bin/bash
read -r -d '' ENDPOINT_31337 < <(cat src/harmonize_contracts/endpoint-address-31337.txt)
read -r -d '' ENDPOINT_31338 < <(cat src/harmonize_contracts/endpoint-address-31338.txt)
read -r -d '' NETWORK_CONFIG << EOM
record {
rpc_services = opt variant {
Custom = record {
chainId = 31337 : nat64;
services = vec { record { url = "https://localhost:8555"; headers = null } };
}
};
rpc_service = opt variant {
Custom = record {
url = "https://localhost:8555";
headers = null;
}
};
get_logs_address = opt vec { "${ENDPOINT_31337}" };
last_scraped_block_number = opt 0: opt nat;
block_tag = opt variant { Latest = null };
}
EOM
dfx canister call harmonize_backend set_network_config "(31337, ${NETWORK_CONFIG})"
read -r -d '' NETWORK_CONFIG << EOM
record {
rpc_services = opt variant {
Custom = record {
chainId = 31338 : nat64;
services = vec { record { url = "https://localhost:8556"; headers = null } };
}
};
rpc_service = opt variant {
Custom = record {
url = "https://localhost:8556";
headers = null;
}
};
get_logs_address = opt vec { "${ENDPOINT_31338}" };
last_scraped_block_number = opt 0: opt nat;
block_tag = opt variant { Latest = null };
}
EOM
dfx canister call harmonize_backend set_network_config "(31338, ${NETWORK_CONFIG})"