@bananapus/address-registry-v6 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/SKILLS.md +51 -0
  4. package/deployments/nana-address-registry/arbitrum/JBAddressRegistry.json +177 -0
  5. package/deployments/nana-address-registry/arbitrum_sepolia/JBAddressRegistry.json +177 -0
  6. package/deployments/nana-address-registry/base/JBAddressRegistry.json +181 -0
  7. package/deployments/nana-address-registry/base_sepolia/JBAddressRegistry.json +181 -0
  8. package/deployments/nana-address-registry/ethereum/JBAddressRegistry.json +181 -0
  9. package/deployments/nana-address-registry/optimism/JBAddressRegistry.json +177 -0
  10. package/deployments/nana-address-registry/optimism_sepolia/JBAddressRegistry.json +181 -0
  11. package/deployments/nana-address-registry/sepolia/JBAddressRegistry.json +181 -0
  12. package/docs/book.css +13 -0
  13. package/docs/book.toml +12 -0
  14. package/docs/solidity.min.js +74 -0
  15. package/docs/src/README.md +164 -0
  16. package/docs/src/SUMMARY.md +6 -0
  17. package/docs/src/src/JBAddressRegistry.sol/contract.JBAddressRegistry.md +106 -0
  18. package/docs/src/src/README.md +5 -0
  19. package/docs/src/src/interfaces/IJBAddressRegistry.sol/interface.IJBAddressRegistry.md +33 -0
  20. package/docs/src/src/interfaces/README.md +4 -0
  21. package/foundry.toml +29 -0
  22. package/package.json +20 -0
  23. package/remappings.txt +1 -0
  24. package/script/Deploy.s.sol +37 -0
  25. package/script/helpers/AddressRegistryDeploymentLib.sol +68 -0
  26. package/slither-ci.config.json +10 -0
  27. package/sphinx.lock +476 -0
  28. package/src/JBAddressRegistry.sol +96 -0
  29. package/src/interfaces/IJBAddressRegistry.sol +22 -0
  30. package/test/JBAddressRegistry.t.sol +104 -0
  31. package/test/JBAddressRegistry_Fork.t.sol +78 -0
package/sphinx.lock ADDED
@@ -0,0 +1,476 @@
1
+ {
2
+ "warning": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
3
+ "format": "sphinx-lock-1.0.0",
4
+ "orgId": "ea165b21-7cdc-4d7b-be59-ecdd4c26bee4",
5
+ "projects": {
6
+ "nana-buyback-hook": {
7
+ "projectId": "f348713c-83c9-4a85-9b34-acce562d5593",
8
+ "projectName": "nana-buyback-hook",
9
+ "defaultSafe": {
10
+ "safeName": "nana-core-small",
11
+ "owners": [
12
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
13
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
14
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
15
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
16
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
17
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
18
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
19
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
20
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
21
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
22
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
23
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
24
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
25
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
26
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
27
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
28
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
29
+ ],
30
+ "threshold": "5",
31
+ "saltNonce": "0"
32
+ }
33
+ },
34
+ "nana-fee-project": {
35
+ "projectId": "8420d3da-9977-4908-be04-d600a090744d",
36
+ "projectName": "nana-fee-project",
37
+ "defaultSafe": {
38
+ "safeName": "nana-core",
39
+ "owners": [
40
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
41
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
42
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
43
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
44
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
45
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
46
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
47
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
48
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
49
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
50
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
51
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
52
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
53
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
54
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
55
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
56
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
57
+ ],
58
+ "threshold": "9",
59
+ "saltNonce": "0"
60
+ }
61
+ },
62
+ "nana-periphery": {
63
+ "projectId": "0de1ae41-0a43-4bc3-8eec-208718afaa51",
64
+ "projectName": "nana-periphery",
65
+ "defaultSafe": {
66
+ "safeName": "nana-core",
67
+ "owners": [
68
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
69
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
70
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
71
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
72
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
73
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
74
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
75
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
76
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
77
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
78
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
79
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
80
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
81
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
82
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
83
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
84
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
85
+ ],
86
+ "threshold": "9",
87
+ "saltNonce": "0"
88
+ }
89
+ },
90
+ "nana-omnichain-deployers": {
91
+ "projectId": "4c8b18a7-99c8-431a-b575-e6817503fbd2",
92
+ "projectName": "nana-omnichain-deployers",
93
+ "defaultSafe": {
94
+ "safeName": "nana-core-small",
95
+ "owners": [
96
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
97
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
98
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
99
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
100
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
101
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
102
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
103
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
104
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
105
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
106
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
107
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
108
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
109
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
110
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
111
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
112
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
113
+ ],
114
+ "threshold": "5",
115
+ "saltNonce": "0"
116
+ }
117
+ },
118
+ "nana-721-hook-v5": {
119
+ "projectId": "b29a3b81-3722-40ad-b831-66472be6d6a8",
120
+ "projectName": "nana-721-hook-v5",
121
+ "defaultSafe": {
122
+ "safeName": "nana-core-v5",
123
+ "owners": [
124
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
125
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
126
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
127
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
128
+ ],
129
+ "threshold": "2",
130
+ "saltNonce": "0"
131
+ }
132
+ },
133
+ "nana-suckers": {
134
+ "projectId": "1b040a9e-0764-4173-880e-b5ebf312bc44",
135
+ "projectName": "nana-suckers",
136
+ "defaultSafe": {
137
+ "safeName": "nana-core",
138
+ "owners": [
139
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
140
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
141
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
142
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
143
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
144
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
145
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
146
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
147
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
148
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
149
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
150
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
151
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
152
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
153
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
154
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
155
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
156
+ ],
157
+ "threshold": "9",
158
+ "saltNonce": "0"
159
+ }
160
+ },
161
+ "nana-buyback-hook-v5": {
162
+ "projectId": "cf0b6f77-d870-4ccf-bbdc-6b22dceb11b6",
163
+ "projectName": "nana-buyback-hook-v5",
164
+ "defaultSafe": {
165
+ "safeName": "nana-core-v5",
166
+ "owners": [
167
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
168
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
169
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
170
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
171
+ ],
172
+ "threshold": "2",
173
+ "saltNonce": "0"
174
+ }
175
+ },
176
+ "nana-swap-terminal-v5": {
177
+ "projectId": "b476ccb3-4857-4d11-87cf-9b5cb3ac27c2",
178
+ "projectName": "nana-swap-terminal-v5",
179
+ "defaultSafe": {
180
+ "safeName": "nana-core-v5",
181
+ "owners": [
182
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
183
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
184
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
185
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
186
+ ],
187
+ "threshold": "2",
188
+ "saltNonce": "0"
189
+ }
190
+ },
191
+ "nana-address-registry-v5": {
192
+ "projectId": "cc6ec42f-5bb5-451a-a66a-928fd3231d2f",
193
+ "projectName": "nana-address-registry-v5",
194
+ "defaultSafe": {
195
+ "safeName": "nana-core-v5",
196
+ "owners": [
197
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
198
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
199
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
200
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
201
+ ],
202
+ "threshold": "2",
203
+ "saltNonce": "0"
204
+ }
205
+ },
206
+ "nana-core": {
207
+ "projectId": "290d6007-345d-4bcc-af08-5e5a26ca2dc5",
208
+ "projectName": "nana-core",
209
+ "defaultSafe": {
210
+ "safeName": "nana-core",
211
+ "owners": [
212
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
213
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
214
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
215
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
216
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
217
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
218
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
219
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
220
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
221
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
222
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
223
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
224
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
225
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
226
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
227
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
228
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
229
+ ],
230
+ "threshold": "9",
231
+ "saltNonce": "0"
232
+ }
233
+ },
234
+ "nana-project-handles-v5": {
235
+ "projectId": "8795935f-e0ba-4b84-9ec2-44315fbdf4d8",
236
+ "projectName": "nana-project-handles-v5",
237
+ "defaultSafe": {
238
+ "safeName": "nana-core-v5",
239
+ "owners": [
240
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
241
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
242
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
243
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
244
+ ],
245
+ "threshold": "2",
246
+ "saltNonce": "0"
247
+ }
248
+ },
249
+ "nana-721-hook": {
250
+ "projectId": "67cfcad1-d38b-4b4d-b137-a24797c31991",
251
+ "projectName": "nana-721-hook",
252
+ "defaultSafe": {
253
+ "safeName": "nana-core",
254
+ "owners": [
255
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
256
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
257
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
258
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
259
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
260
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
261
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
262
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
263
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
264
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
265
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
266
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
267
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
268
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
269
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
270
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
271
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
272
+ ],
273
+ "threshold": "9",
274
+ "saltNonce": "0"
275
+ }
276
+ },
277
+ "nana-address-registry": {
278
+ "projectId": "b1c7e214-2927-4042-a3c9-d5751940ce28",
279
+ "projectName": "nana-address-registry",
280
+ "defaultSafe": {
281
+ "safeName": "nana-core",
282
+ "owners": [
283
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
284
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
285
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
286
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
287
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
288
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
289
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
290
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
291
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
292
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
293
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
294
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
295
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
296
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
297
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
298
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
299
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
300
+ ],
301
+ "threshold": "9",
302
+ "saltNonce": "0"
303
+ }
304
+ },
305
+ "nana-swap-terminal": {
306
+ "projectId": "a804c33d-fd0c-4dea-930b-ab72fec9f557",
307
+ "projectName": "nana-swap-terminal",
308
+ "defaultSafe": {
309
+ "safeName": "nana-core-small",
310
+ "owners": [
311
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
312
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
313
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
314
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
315
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
316
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
317
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
318
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
319
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
320
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
321
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
322
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
323
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
324
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
325
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
326
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
327
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
328
+ ],
329
+ "threshold": "5",
330
+ "saltNonce": "0"
331
+ }
332
+ },
333
+ "croptop-core": {
334
+ "projectId": "0c213583-47a4-4212-a7cb-b2c0cfdcdac4",
335
+ "projectName": "croptop-core",
336
+ "defaultSafe": {
337
+ "safeName": "croptop",
338
+ "owners": [
339
+ "0x14293560A2dde4fFA136A647b7a2f927b0774AB6",
340
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
341
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
342
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
343
+ "0xCa81360a91504500674E926b1b301165b2CA9807"
344
+ ],
345
+ "threshold": "2",
346
+ "saltNonce": "0"
347
+ }
348
+ },
349
+ "revnet-core": {
350
+ "projectId": "ff72a6d2-9324-49ef-a415-57e253550e9e",
351
+ "projectName": "revnet-core",
352
+ "defaultSafe": {
353
+ "safeName": "revnet",
354
+ "owners": [
355
+ "0x14293560A2dde4fFA136A647b7a2f927b0774AB6",
356
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
357
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
358
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
359
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
360
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
361
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
362
+ ],
363
+ "threshold": "3",
364
+ "saltNonce": "0"
365
+ }
366
+ },
367
+ "banny-core": {
368
+ "projectId": "26678812-e6ca-443d-a5e0-7b62fcdd455f",
369
+ "projectName": "banny-core",
370
+ "defaultSafe": {
371
+ "safeName": "banny-core",
372
+ "owners": [
373
+ "0x14293560A2dde4fFA136A647b7a2f927b0774AB6",
374
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
375
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
376
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
377
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1"
378
+ ],
379
+ "threshold": "2",
380
+ "saltNonce": "0"
381
+ }
382
+ },
383
+ "banny-core-v5": {
384
+ "projectId": "47a1f9c8-f418-4907-8402-bfc456ada246",
385
+ "projectName": "banny-core-v5",
386
+ "defaultSafe": {
387
+ "safeName": "banny-core",
388
+ "owners": [
389
+ "0x14293560A2dde4fFA136A647b7a2f927b0774AB6",
390
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
391
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
392
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
393
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1"
394
+ ],
395
+ "threshold": "2",
396
+ "saltNonce": "0"
397
+ }
398
+ },
399
+ "nana-project-handles": {
400
+ "projectId": "67c86da0-a089-4b0f-a04d-4dffda844ff9",
401
+ "projectName": "nana-project-handles",
402
+ "defaultSafe": {
403
+ "safeName": "nana-core-small",
404
+ "owners": [
405
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
406
+ "0x34aA3F359A9D614239015126635CE7732c18fDF3",
407
+ "0x5a3f5ac3D6f1a0061D3bB91f38606F7103eCdBe8",
408
+ "0x5EE9F1cdD9588A3c800441CBd7A38Ffeff40cBc2",
409
+ "0x63A2368F4B509438ca90186cb1C15156713D5834",
410
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
411
+ "0x721b19e30EF791FF2A67FF4b375E591aAf84136B",
412
+ "0x73aEd5a32E898644Acb841C3Ac40663202CfD485",
413
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
414
+ "0x8d3CC5b1a5268Ff0C119c5c03252EB8c1bFEBbB2",
415
+ "0x99368d83F73b803Caf924956C5EE6E0b8f86Fb3B",
416
+ "0xc109636a2b47f8b290cc134dd446Fcd7d7e0cC94",
417
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
418
+ "0xD78285eef93E13D1F96062265b68099C480121b8",
419
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
420
+ "0xe7879a2D05dBA966Fcca34EE9C3F99eEe7eDEFd1",
421
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
422
+ ],
423
+ "threshold": "5",
424
+ "saltNonce": "0"
425
+ }
426
+ },
427
+ "nana-core-v5": {
428
+ "projectId": "43d1f453-3129-4383-a056-d1da4f3b1ee8",
429
+ "projectName": "nana-core-v5",
430
+ "defaultSafe": {
431
+ "safeName": "nana-core-v5",
432
+ "owners": [
433
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
434
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
435
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
436
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
437
+ ],
438
+ "threshold": "2",
439
+ "saltNonce": "0"
440
+ }
441
+ },
442
+ "nana-suckers-v5": {
443
+ "projectId": "55b45d45-a209-4197-83e1-aa096e19ddbc",
444
+ "projectName": "nana-suckers-v5",
445
+ "defaultSafe": {
446
+ "safeName": "nana-core-v5",
447
+ "owners": [
448
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
449
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
450
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
451
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651"
452
+ ],
453
+ "threshold": "2",
454
+ "saltNonce": "0"
455
+ }
456
+ },
457
+ "revnet-core-v5": {
458
+ "projectId": "cf581f7f-8bab-4773-b1bf-6389b6891056",
459
+ "projectName": "revnet-core-v5",
460
+ "defaultSafe": {
461
+ "safeName": "revnet",
462
+ "owners": [
463
+ "0x14293560A2dde4fFA136A647b7a2f927b0774AB6",
464
+ "0x1bb1e3F6818FeB7c1F1674e6E7D6c30BA2725643",
465
+ "0x6849310926127F819d48894DeA667f3ECD18a07c",
466
+ "0x823b92d6a4b2AED4b15675c7917c9f922ea8ADAD",
467
+ "0xCa81360a91504500674E926b1b301165b2CA9807",
468
+ "0xDc6Dd6Bc601448541A4862a91De1B86291839651",
469
+ "0xf33CFe55655B0190eAF5aC2749F954c64E06d887"
470
+ ],
471
+ "threshold": "3",
472
+ "saltNonce": "0"
473
+ }
474
+ }
475
+ }
476
+ }
@@ -0,0 +1,96 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.23;
3
+
4
+ import {IJBAddressRegistry} from "./interfaces/IJBAddressRegistry.sol";
5
+
6
+ /// @notice Frontend clients need a way to verify that a Juicebox contract has a deployer they trust.
7
+ /// `JBAddressRegistry` allows any contract deployed with `create` or `create2` to publicly register its deployer's
8
+ /// address. Whoever deploys
9
+ /// a contract is responsible for registering it.
10
+ /// @dev `JBAddressRegistry` is intended for registering the deployers of Juicebox pay/redeem hooks, but does not
11
+ /// enforce adherence to an interface, and can be used for any `create`/`create2` deployer.
12
+ /// @dev The addresses of the deployed contracts are computed deterministically based on the deployer's address, and a
13
+ /// nonce (for `create`) or `create2` salt and deployment bytecode (for `create2`).
14
+ contract JBAddressRegistry is IJBAddressRegistry {
15
+ //*********************************************************************//
16
+ // --------------------- public stored properties -------------------- //
17
+ //*********************************************************************//
18
+
19
+ /// @notice Returns the deployer of a given contract which has been registered.
20
+ /// @dev Whoever deploys a contract is responsible for registering it.
21
+ /// @custom:param addr The address of the contract to get the deployer of.
22
+ mapping(address addr => address deployer) public override deployerOf;
23
+
24
+ //*********************************************************************//
25
+ // ---------------------- external transactions ---------------------- //
26
+ //*********************************************************************//
27
+
28
+ /// @notice Register a deployed contract's address.
29
+ /// @dev The contract must be deployed using `create`.
30
+ /// @param deployer The address of the contract's deployer.
31
+ /// @param nonce The nonce used to deploy the contract.
32
+ function registerAddress(address deployer, uint256 nonce) external override {
33
+ // Calculate the address of the contract, assuming it was deployed using `create` with the specified nonce.
34
+ address hook = _addressFrom({origin: deployer, nonce: nonce});
35
+
36
+ // Register the contract using the calculated address.
37
+ _registerAddress({addr: hook, deployer: deployer});
38
+ }
39
+
40
+ /// @notice Register a deployed contract's address.
41
+ /// @dev The contract must be deployed using `create2`.
42
+ /// @dev The `create2` salt is determined by the deployer's logic. The deployment bytecode can be retrieved offchain
43
+ /// (from the deployment transaction) or onchain (with `abi.encodePacked(type(deployedContract).creationCode,
44
+ /// abi.encode(constructorArguments))`).
45
+ /// @param deployer The address of the contract's deployer.
46
+ /// @param salt The `create2` salt used to deploy the contract.
47
+ /// @param bytecode The contract's deployment bytecode, including the constructor arguments.
48
+ function registerAddress(address deployer, bytes32 salt, bytes calldata bytecode) external override {
49
+ // Calculate the address of the contract using the provided `create2` salt and deployment bytecode.
50
+ address hook =
51
+ address(uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, keccak256(bytecode))))));
52
+
53
+ // Register the contract using the calculated address.
54
+ _registerAddress({addr: hook, deployer: deployer});
55
+ }
56
+
57
+ //*********************************************************************//
58
+ // ---------------------- internal transactions ---------------------- //
59
+ //*********************************************************************//
60
+
61
+ /// @notice Compute the address of a contract deployed using `create` based on the deployer's address and nonce.
62
+ /// @dev Taken from https://ethereum.stackexchange.com/a/87840/68134 - this won't work for nonces > 2**32. If
63
+ /// you reach that nonce please: 1) ping us, because wow 2) use another deployer.
64
+ /// @param origin The deployer's address.
65
+ /// @param nonce The nonce used to deploy the contract.
66
+ function _addressFrom(address origin, uint256 nonce) internal pure returns (address addr) {
67
+ bytes memory data;
68
+ if (nonce == 0x00) {
69
+ data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), origin, bytes1(0x80));
70
+ } else if (nonce <= 0x7f) {
71
+ data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), origin, uint8(nonce));
72
+ } else if (nonce <= 0xff) {
73
+ data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), origin, bytes1(0x81), uint8(nonce));
74
+ } else if (nonce <= 0xffff) {
75
+ data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), origin, bytes1(0x82), uint16(nonce));
76
+ } else if (nonce <= 0xffffff) {
77
+ data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), origin, bytes1(0x83), uint24(nonce));
78
+ } else {
79
+ data = abi.encodePacked(bytes1(0xda), bytes1(0x94), origin, bytes1(0x84), uint32(nonce));
80
+ }
81
+ bytes32 hash = keccak256(data);
82
+ assembly {
83
+ mstore(0, hash)
84
+ addr := mload(0)
85
+ }
86
+ }
87
+
88
+ /// @notice Register a contract's deployer in the `deployerOf` mapping.
89
+ /// @param addr The deployed contract's address.
90
+ /// @param deployer The deployer's address.
91
+ function _registerAddress(address addr, address deployer) internal {
92
+ deployerOf[addr] = deployer;
93
+
94
+ emit AddressRegistered({addr: addr, deployer: deployer, caller: msg.sender});
95
+ }
96
+ }
@@ -0,0 +1,22 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.0;
3
+
4
+ interface IJBAddressRegistry {
5
+ event AddressRegistered(address indexed addr, address indexed deployer, address caller);
6
+
7
+ /// @notice Returns the deployer of a given contract which has been registered.
8
+ /// @param addr The address of the contract to get the deployer of.
9
+ /// @return deployer The deployer of the contract.
10
+ function deployerOf(address addr) external view returns (address deployer);
11
+
12
+ /// @notice Register a contract deployed with `create`.
13
+ /// @param deployer The address of the contract's deployer.
14
+ /// @param nonce The nonce used to deploy the contract.
15
+ function registerAddress(address deployer, uint256 nonce) external;
16
+
17
+ /// @notice Register a contract deployed with `create2`.
18
+ /// @param deployer The address of the contract's deployer.
19
+ /// @param salt The `create2` salt used to deploy the contract.
20
+ /// @param bytecode The contract's deployment bytecode, including the constructor arguments.
21
+ function registerAddress(address deployer, bytes32 salt, bytes calldata bytecode) external;
22
+ }