-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
136 lines (100 loc) · 4.83 KB
/
Makefile
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
all: local_deploy_evm_rpc local_deploy_apollo
update_candid:
cargo test update_candid
build_apollo_instance:
dfx build --check apollo_instance
mv ./.dfx/local/canisters/apollo_instance/apollo_instance.wasm assets/apollo_instance.wasm
local_deploy_evm_rpc:
dfx deploy evm_rpc --argument '(record { nodesInSubnet = 28 })'
local_deploy_apollo: update_candid build_apollo_instance
ifndef SYBIL_CANISTER
$(error SYBIL_CANISTER ENV is undefined)
endif
dfx deploy --specified-id ajuq4-ruaaa-aaaaa-qaaga-cai evm_rpc --argument '(record { nodesInSubnet = 28 })'
dfx canister create apollo && dfx build apollo && gzip -f -1 ./.dfx/local/canisters/apollo/apollo.wasm
dfx canister install --wasm ./.dfx/local/canisters/apollo/apollo.wasm.gz --argument \
"(\"${SYBIL_CANISTER}\", \"dfx_test_key\")" apollo
local_deploy_apollo_instance: update_candid
ifndef SYBIL_CANISTER
$(error SYBIL_CANISTER ENV is undefined)
endif
ifndef MULTICALL_ADDRESS
$(eval MULTICALL_ADDRESS := 0x65309C2B0f31866a46b0FB2BcA2c3188a747B78f)
$(echo MULTICALL_ADDRESS ENV is undefined, using default value: ${MULTICALL_ADDRESS} for holeski)
endif
dfx deploy --specified-id ajuq4-ruaaa-aaaaa-qaaga-cai evm_rpc --argument '(record { nodesInSubnet = 28 })'
dfx canister create apollo_instance && dfx build apollo_instance && gzip -f -1 ./.dfx/local/canisters/apollo_instance/apollo_instance.wasm
dfx canister install --wasm ./.dfx/local/canisters/apollo_instance/apollo_instance.wasm.gz --argument \
"(record {\
apollos_fee = 0:nat; \
key_name = \"dfx_test_key\"; \
chain_id = 167008:nat; \
chain_rpc = \"https://taiko-katla.blockpi.network/v1/rpc/public\"; \
apollo_coordinator = \"0xC1e42d86716f8b8fA616249112a21622b07319a3\"; \
multicall_address = \"${MULTICALL_ADDRESS}\"; \
timer_frequency_sec = 10:nat64; \
block_gas_limit = 1000000000000:nat; \
sybil_canister_address = \"${SYBIL_CANISTER}\"; \
min_balance = 50_000_000_000_000_000:nat; \
})" apollo_instance
local_upgrade_apollo_instance: update_candid
dfx build apollo_instance
gzip -f -1 ./.dfx/local/canisters/apollo_instance/apollo_instance.wasm
dfx canister install --mode upgrade --wasm ./.dfx/local/canisters/apollo_instance/apollo_instance.wasm.gz apollo_instance
local_upgrade: local_upgrade_apollo local_upgrade_evm_rpc
local_upgrade_apollo: build_apollo_instance update_candid
dfx build apollo
gzip -f -1 ./.dfx/local/canisters/apollo/apollo.wasm
dfx canister install --mode upgrade --wasm ./.dfx/local/canisters/apollo/apollo.wasm.gz apollo
dfx canister call apollo upgrade_chains
local_upgrade_evm_rpc: local_deploy_evm_rpc
ic_upgrade: ic_upgrade_apollo
ic_upgrade_apollo: build_apollo_instance update_candid
dfx build apollo --network ic && gzip -f -1 ./.dfx/ic/canisters/apollo/apollo.wasm
dfx canister install --mode upgrade --wasm ./.dfx/ic/canisters/apollo/apollo.wasm.gz --network ic apollo
dfx canister call apollo upgrade_chains --ic
ic_deploy_apollo: build_apollo_instance update_candid
ifndef SYBIL_CANISTER
$(error SYBIL_CANISTER ENV is undefined)
endif
dfx canister create apollo
dfx build apollo && gzip -f -1 ./.dfx/local/canisters/apollo/apollo.wasm
dfx canister install --wasm ./.dfx/local/canisters/apollo/apollo.wasm.gz --argument \
"(\"${SYBIL_CANISTER}\", \"key_1\")" apollo --ic
local_apollo_add_apollo_instance: local_upgrade_apollo
ifndef MULTICALL_ADDRESS
$(eval MULTICALL_ADDRESS := 0x65309C2B0f31866a46b0FB2BcA2c3188a747B78f)
$(echo MULTICALL_ADDRESS ENV is undefined, using default value: ${MULTICALL_ADDRESS} for holeski)
endif
ifndef CHAIN_RPC
$(error CHAIN_RPC ENV is undefined)
endif
ifndef APOLLO_COORDINATOR
$(error APOLLO_COORDINATOR ENV is undefined)
endif
dfx canister call apollo add_apollo_instance \
"(record {\
apollos_fee = 0:nat; \
chain_id = 11155111:nat; \
chain_rpc = \"${CHAIN_RPC}\"; \
apollo_coordinator = \"${APOLLO_COORDINATOR}\"; \
multicall_address = \"${MULTICALL_ADDRESS}\"; \
timer_frequency_sec = 10:nat64; \
block_gas_limit = 1_000_000_000_000:nat; \
evm_rpc_canister = \"$(shell dfx canister id evm_rpc)\"; \
min_balance = 50_000_000_000_000_000:nat; \
})" --with-cycles 500000000000 --wallet $(shell dfx identity get-wallet)
local_apollo_add_apollo_instance_sepoila: local_upgrade_apollo
$(eval EVM_RPC_CANISTER := $(shell dfx canister id evm_rpc))
dfx canister call apollo add_apollo_instance \
"(record {\
apollos_fee = 0:nat; \
chain_id = 11155111:nat; \
chain_rpc = \"https://ethereum-sepolia-rpc.publicnode.com\"; \
apollo_coordinator = \"0x94B3792b41c78298DbE78D22078cCd2CC6415308\"; \
multicall_address = \"\"; \
timer_frequency_sec = 10:nat64; \
block_gas_limit = 1_000_000_000_000:nat; \
evm_rpc_canister = \"${EVM_RPC_CANISTER}\"; \
min_balance = 50_000_000_000_000_000:nat; \
})" --with-cycles 500000000000 --wallet $(shell dfx identity get-wallet)