forked from dfinity/ic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainnet-canisters.bzl
214 lines (186 loc) · 9.57 KB
/
mainnet-canisters.bzl
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
"""
This module defines Bazel targets for the mainnet versions of the core NNS, SNS, and ck canisters.
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
# WASM metadata is a 2-tuple of git commit ID and WASM hash.
CANISTER_NAME_TO_WASM_METADATA = {
"governance": ("ae659b2cad97aa3cf07b523907ef079338fc3bf3", "ce18f3eb851c47e27e09df29a44fe4513735fed28949b9d5ddcabfd4fe001fe3"),
"ledger": ("b43280208c32633a29657a1051660324e88a373d", "209d01896799444a40a80ac21ac22ad23fd7abdde7d6cff0c96326d178e4c5a8"),
"archive": ("b43280208c32633a29657a1051660324e88a373d", "db0f094005a0e84e243f8f300236be879dcefa412c2fd36d675390caa689d88d"),
"index": ("b43280208c32633a29657a1051660324e88a373d", "62bbbada301838ad0f6e371415be990ce70e36c6f11267d4ba9fac8ff09aa32d"),
"root": ("ad5629caa17ac8a4545bc2e3cf0ecc990c9f681e", "713f44b9d26cfc9ed2083bad954cdfcabb7de211bfc1c4fc811d8c7bb4f47d81"),
"registry": ("3b3ffedc6aa481fd9b92eefaf46beded9e51a344", "fe7793076ac5b1a0d55a5d38b226c6c1a99b3550c1d28b235c53c1607b04ad6b"),
"lifeline": ("35e4f2c583b0657aa730740b5c8aca18a8718b8e", "614d7d418c4eaa9984b6c3f4afe2d1e45b2f110369edcc2dc767792181742348"),
"genesis-token": ("ad5629caa17ac8a4545bc2e3cf0ecc990c9f681e", "a403f573c4426065b1a9b7b5b1a7f95c04534c6d79a06be71f1d04212b40e9de"),
"cycles-minting": ("3b3ffedc6aa481fd9b92eefaf46beded9e51a344", "f24df747ad451a9d45fe2e98aa60b82578203fb73fc24316cd33ce98307e9f0c"),
"sns-wasm": ("3b3ffedc6aa481fd9b92eefaf46beded9e51a344", "f4d02df832c1ef951618d954c52ee06cd6046b170d1b360563116c2a40afe643"),
"swap": ("ae659b2cad97aa3cf07b523907ef079338fc3bf3", "0f553be99baaaf79f23e85392f4f09dba02f89a2f2ce93f2fa4819f3149b9f84"),
"sns_root": ("ad5629caa17ac8a4545bc2e3cf0ecc990c9f681e", "2c6018ca27ae077a26acb63821d20328bf1db2dc2710d9a7245cd1c4ae22d388"),
"sns_governance": ("ae659b2cad97aa3cf07b523907ef079338fc3bf3", "a1d73b5e31669edacde9f767ecce598c03fa1cd71fe4873be5e0260076ed4e99"),
"sns_index": ("35e4f2c583b0657aa730740b5c8aca18a8718b8e", "110352d412a97dce090dd902e9dbdc874211d0e7a5179b6814ec1694e45a2807"),
"sns_ledger": ("35e4f2c583b0657aa730740b5c8aca18a8718b8e", "26de3e745b0e98cc83850ebf0f8fd1a574905bf7c73d52fcf61ee3f35e4875e1"),
"sns_archive": ("35e4f2c583b0657aa730740b5c8aca18a8718b8e", "ea2df4e0e3f4e5e91d43baf281728b2443ab3236ba473d78913cfbe2b5763d3c"),
"ck_btc_index": ("a3831c87440df4821b435050c8a8fcb3745d86f6", "cac207cf438df8c9fba46d4445c097f05fd8228a1eeacfe0536b7e9ddefc5f1c"),
"ck_btc_ledger": ("a3831c87440df4821b435050c8a8fcb3745d86f6", "4264ce2952c4e9ff802d81a11519d5e3ffdaed4215d5831a6634e59efd72f7d8"),
"ck_eth_index": ("a3831c87440df4821b435050c8a8fcb3745d86f6", "8104acad6105abb069b2dbc8289692bd63c2d110127f8e91f99db51465962606"),
"ck_eth_ledger": ("a3831c87440df4821b435050c8a8fcb3745d86f6", "e5c8a297d1c0c6d2ab2253c0280aaefd6e23fe3a8a994fc64706a1f3c3116062"),
}
def canister_url(git_commit_id, filename):
return "https://download.dfinity.systems/ic/{git_commit_id}/canisters/{filename}".format(
git_commit_id = git_commit_id,
filename = filename,
)
def mainnet_core_nns_canisters():
"""
Provides Bazel targets for the **core** NNS canisters that are currently deployed to the mainnet.
This includes: Lifeline, Root, Registry, Governance, ICP Ledger (Index, Archive), CMC, GTC, SNS-W.
"""
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["registry"]
http_file(
name = "mainnet_nns_registry_canister",
downloaded_file_path = "registry-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "registry-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["governance"]
http_file(
name = "mainnet_nns_governance_canister",
downloaded_file_path = "governance-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "governance-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["ledger"]
http_file(
name = "mainnet_icp_ledger_canister",
downloaded_file_path = "ledger-canister_notify-method.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ledger-canister_notify-method.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["archive"]
http_file(
name = "mainnet_icp_ledger-archive-node-canister",
downloaded_file_path = "ledger-archive-node-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ledger-archive-node-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["index"]
http_file(
name = "mainnet_icp_index_canister",
downloaded_file_path = "ic-icp-index-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icp-index-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["root"]
http_file(
name = "mainnet_nns_root-canister",
downloaded_file_path = "root-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "root-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["lifeline"]
http_file(
name = "mainnet_nns_lifeline_canister",
downloaded_file_path = "lifeline-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "lifeline_canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["genesis-token"]
http_file(
name = "mainnet_nns_genesis-token-canister",
downloaded_file_path = "genesis-token-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "genesis-token-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["cycles-minting"]
http_file(
name = "mainnet_nns_cycles-minting-canister",
downloaded_file_path = "cycles-minting-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "cycles-minting-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns-wasm"]
http_file(
name = "mainnet_nns_sns-wasm-canister",
downloaded_file_path = "sns-wasm-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "sns-wasm-canister.wasm.gz"),
)
def mainnet_ck_canisters():
"""
Provides Bazel targets for the latest ckBTC and ckETH canisters published to the mainnet fiduciary subnet.
"""
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["ck_btc_ledger"]
http_file(
name = "mainnet_ckbtc_ic-icrc1-ledger",
downloaded_file_path = "ic-icrc1-ledger.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-ledger.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["ck_btc_index"]
http_file(
name = "mainnet_ckbtc-index-ng",
downloaded_file_path = "ic-icrc1-index-ng.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-index-ng.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["ck_eth_ledger"]
http_file(
name = "mainnet_cketh_ic-icrc1-ledger-u256",
downloaded_file_path = "ic-icrc1-ledger-u256.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-ledger-u256.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["ck_eth_index"]
http_file(
name = "mainnet_cketh-index-ng",
downloaded_file_path = "ic-icrc1-index-ng-u256.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-index-ng-u256.wasm.gz"),
)
def mainnet_sns_canisters():
"""
Provides Bazel targets for the latest SNS canisters published to the mainnet SNS-W.
This includes: Root, SNS Governance, Swap, SNS Ledger (Index, Archive).
"""
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns_root"]
http_file(
name = "mainnet_sns-root-canister",
downloaded_file_path = "sns-root-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "sns-root-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns_governance"]
http_file(
name = "mainnet_sns-governance-canister",
downloaded_file_path = "sns-governance-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "sns-governance-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["swap"]
http_file(
name = "mainnet_sns-swap-canister",
downloaded_file_path = "sns-swap-canister.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "sns-swap-canister.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns_ledger"]
http_file(
name = "mainnet_ic-icrc1-ledger",
downloaded_file_path = "ic-icrc1-ledger.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-ledger.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns_archive"]
http_file(
name = "mainnet_ic-icrc1-archive",
downloaded_file_path = "ic-icrc1-archive.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-archive.wasm.gz"),
)
git_commit_id, sha256 = CANISTER_NAME_TO_WASM_METADATA["sns_index"]
http_file(
name = "mainnet_ic-icrc1-index-ng",
downloaded_file_path = "ic-icrc1-index-ng.wasm.gz",
sha256 = sha256,
url = canister_url(git_commit_id, "ic-icrc1-index-ng.wasm.gz"),
)