Adapter

Simple Treasuries

Fetches treasuries that can be loaded from Zerion without special operations.

Sub-Adapters 45

Preview and test each sub adapter.

1inch (1inch)

Aavegotchi (aavegotchi)

Abracadabra (abracadabra)

Alchemix (alchemix)

API3 (api3)

Aragon (aragon)

Babylon Finance (babylon)

Badger (badger)

Balancer (balancer)

Bankless DAO (bankless)

BarnBridge (barnbridge)

BitDAO (bitdao)

Compound (compound)

Decentraland (decentraland)

Gitcoin (gitcoin)

Fei (fei)

Idle DAO (idle)

Index Coop (index-coop)

KeeperDAO (keeper)

The LAO (lao)

Lido (lido)

Linkswap (linkswap)

MetaCartel Ventures (metacartel-ventures)

mStable (mstable)

Nexus Mutual (nexus)

NFTX (nftx)

Nouns DAO (nouns)

Olympus DAO (olympus)

Paraswap (paraswap)

PieDAO (piedao)

Perpetual Protocol (perpetual)

PleaserDAO (pleaserdao)

PrimeDAO (primedao)

Radicle (radicle)

Rarible (rarible)

ShapeShift (shapeshift)

Stakeborg DAO (stakeborg)

SushiSwap (sushi)

Synthetix (synthetix)

Tempus (tempus)

Tornado Cash (tornado)

Uniswap (uniswap)

Unslashed Finance (unslashed)

Yam Finance (yam)

Yearn (yearn)

Adapter Code

Check the entire code written for the Adapter.

Source code

Showing TS source.
1export const name = 'Simple Treasuries';
2export const version = '0.1.23';
3export const license = 'MIT';
4export const description = 'Fetches treasuries that can be loaded from Zerion without special operations.';
5export const changeLog = 'Added Tempus Treasury';
6
7interface Org {
8  id: string
9  icon?: string
10  addresses: string[]
11  vestingAddresses?: string[]
12  nativeTokens?: string[]
13  iconType?: string
14  snapshotId?: string
15  governanceSite?: string
16  metadata: any
17  getProposals?: (sdk: Context) => Promise<any>
18}
19
20export async function setup(sdk: Context) {
21  const orgs: Org[] = [
22    {
23      id: '1inch',
24      addresses: ['0x7951c7ef839e26F63DA87a42C9a87986507f1c07'],
25      icon: 'QmebJTDWem5sHs9ZTv7DHtpoTQFQchdN7tXJjwYXabwgTP',
26      snapshotId: '1inch.eth',
27      metadata: {
28        name: '1inch',
29        website: 'https://1inch.io',
30        governanceForum: 'https://gov.1inch.io',
31      },
32    },
33    {
34      id: 'aavegotchi',
35      addresses: [ '0xffe6280ae4e864d9af836b562359fd828ece8020' ],
36      icon: 'QmPe79ZtTxhpLXrRGBCjkhoMaTMrBmb7YDkycEFgcmBNVc',
37      iconType: 'image/png',
38      snapshotId: 'aavegotchi.eth',
39      metadata: {
40        name: 'Aavegotchi',
41        website: 'https://aavegotchi.com/',
42        governanceForum: 'https://dao.aavegotchi.com/',
43      },
44    },
45    {
46      id: 'abracadabra',
47      addresses: ['0x5a7c5505f3cfb9a0d9a8493ec41bf27ee48c406d'],
48      icon: 'QmR8XgrW7cGncTjPQJ2LBnoQHBFBRve7mN1PT6yLjrKX6s',
49      iconType: 'image/png',
50      snapshotId: 'abracadabrabymerlinthemagician.eth',
51      metadata: {
52        name: 'Abracadabra',
53        website: 'https://abracadabra.money/',
54        governanceSite: 'https://snapshot.page/#/abracadabrabymerlinthemagician.eth',
55        governanceForum: 'https://forum.abracadabra.money/',
56        governanceModel: '',
57      },
58    },
59    {
60      id: 'alchemix',
61      addresses: ['0x8392f6669292fa56123f71949b52d883ae57e225'],
62      icon: 'QmSuSUcAvGkxkJ7n5RxnDyqXUchAjXMwTmNioz2xzXVfxo',
63      iconType: 'image/jpeg',
64      snapshotId: 'alchemixstakers.eth',
65      metadata: {
66        name: 'Alchemix',
67        website: 'https://alchemix.fi/',
68        governanceSite: 'https://snapshot.page/#/alchemixstakers.eth',
69        governanceForum: 'https://forum.alchemix.fi',
70        governanceModel: '',
71      },
72    },
73    {
74      id: 'api3',
75      addresses: [
76        '0xe7aF7c5982e073aC6525a34821fe1B3e8E432099', // v1
77        '0xD9F80Bdb37E6Bad114D747E60cE6d2aaF26704Ae', // v2_primary
78        '0x556ECbb0311D350491Ba0EC7E019c354D7723CE0' // v2_secondary
79      ],
80      icon: 'QmVp2hVgfD8sQRFosydPsNAVmttno5tRhun44YiXagNeGX',
81      iconType: 'image/jpeg',
82      metadata: {
83        name: 'API3',
84        website: 'https://api3.org',
85        governanceSite: 'https://api3.eth.link/#/governance',
86        governanceModel: '',
87      },
88    },
89    {
90      id: 'aragon',
91      addresses: ['0xfb633f47a84a1450ee0413f2c32dc1772ccaea3e'],
92      icon: 'QmVCYznBiU8ibk1YuuuhgRu6pWx1PQTYptvvjiVbGGTdyn',
93      iconType: 'image/png',
94      metadata: {
95        name: 'Aragon',
96        website: 'https://aragon.org/',
97        governanceSite: 'https://client.aragon.org/#/budget/0x6c871f1fc69c23809413a96fb359cb428245aa60/',
98      },
99    },
100    {
101      id: 'babylon',
102      addresses: [
103        '0xD7AAf4676F0F52993cb33aD36784BF970f0E1259', 
104      ],
105      icon: 'QmVQFJ6mC1wyeQcfQcVDZGC83a2rVPrc92ncVfeAR5VExE',
106      iconType: 'image/jpeg',
107      metadata: {
108        name: 'Babylon Finance',
109        website: 'https://www.babylon.finance/',
110        governanceSite: 'https://www.withtally.com/governance/eip155:1:0xBEC3de5b14902C660Bd2C7EfD2F259998424cc24',
111      },
112    },
113    {
114      id: 'badger',
115      addresses: [
116        '0x4441776e6a5d61fa024a5117bfc26b953ad1f425',
117        '0x5a54ca44e8f5a1a695f8621f15bfa159a140bb61',
118        '0x8de82c4c968663a0284b01069dde6ef231d0ef9b',
119        '0xb65cef03b9b89f99517643226d76e286ee999e77',
120      ],
121      icon: 'QmSraKiNmctuShFEqgGmLVamKuwZC6TFs26R27959ugExn',
122      iconType: 'image/png',
123      snapshotId: 'badgerdao.eth',
124      metadata: {
125        name: 'Badger',
126        description: 'Badger DAO is dedicated to building products and infrastructure to bring Bitcoin to DeFi.',
127        website: 'https://badger.finance',
128        governanceForum: 'https://forum.badger.finance',
129        governanceModel: '',
130      },
131    },
132    {
133      id: 'balancer',
134      addresses: [
135        '0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f', // ecosystem fund
136        '0xce88686553686DA562CE7Cea497CE749DA109f9F', // protocol fee collector
137      ],
138      icon: 'Qma9agewDVEhZjnLrY2aWy3ZHvYmUtZ5uXM3tCHZu5eDM2',
139      metadata: {
140        name: 'Balancer',
141        website: 'https://balancer.finance',
142        governanceSite: 'https://vote.balancer.finance',
143        governanceForum: 'https://forum.balancer.fi/',
144        governanceModel: '',
145      },
146    },
147    {
148      id: 'bankless',
149      addresses: [ '0xf26d1bb347a59f6c283c53156519cc1b1abaca51' ],
150      icon: 'QmfXpfiEavuqHB9wHxeup9QHttaeindCzwtnFvN756vnQW',
151      iconType: 'image/png',
152      snapshotId: 'banklessvault.eth',
153      metadata: {
154        name: 'Bankless DAO',
155        website: 'https://www.bankless.community/',
156        governanceForum: 'https://forum.bankless.community/',
157      },
158    },
159    {
160      id: 'barnbridge',
161      addresses: ['0x4cAE362D7F227e3d306f70ce4878E245563F3069'],
162      icon: 'QmWD4Eg6AdYmyAb9aSfELP7L4cU2uTFYoejHVsWjerYWZo',
163      metadata: {
164        name: 'BarnBridge',
165        website: 'https://barnbridge.com/',
166        governanceSite: 'https://app.barnbridge.com/governance',
167        governanceForum: 'https://forum.barnbridge.com/',
168        governanceModel: '',
169      },
170    },
171    {
172      id: 'bitdao',
173      addresses: ['0x78605Df79524164911C144801f41e9811B7DB73D'],
174      icon: 'QmVG1ziAPLtJkX7xogmLVxwnBiT5qEEy1P9aHWPM9J9Y17',
175      metadata: {
176        name: 'BitDAO',
177        website: 'https://bitdao.io',
178        governanceSite: 'https://snapshot.org/#/bitdao.eth',
179        governanceForum: 'https://discourse.bitdao.io/',
180        governanceModel: '',
181      },
182    },
183    {
184      id: 'compound',
185      addresses: ['0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b'],
186      vestingAddresses: ['0x2775b1c75658Be0F640272CCb8c72ac986009e38'],
187      icon: 'QmZpZsg829EnBxE2MPZykZpAfsxyRsu6EuGbtfTkf2EFNj',
188      metadata: {
189        name: 'Compound',
190        website: 'https://compound.finance',
191        governanceSite: 'https://compound.finance/governance',
192        governanceForum: 'https://www.comp.xyz',
193        governanceModel: '',
194      },
195    },
196    {
197      id: 'decentraland',
198      addresses: ['0x9a6ebe7e2a7722f8200d0ffb63a1f6406a0d7dce'],
199      icon: 'QmQGRHYnYF6gGSrAvou945hcVi2nygTar6U6hwPuC2vyfi',
200      iconType: 'image/png',
201      metadata: {
202        name: 'Decentraland',
203        website: 'https://decentraland.org/',
204        governanceSite: 'https://client.aragon.org/#/0xf47917b108ca4b820ccea2587546fbb9f7564b56/0x41e83d829459f99bf4ee2e26d0d79748fb16b94f/',
205        governanceForum: 'https://forum.decentraland.org/c/governance/13',
206      },
207    },
208    {
209      id: 'gitcoin',
210      addresses: [
211        '0x57a8865cfB1eCEf7253c27da6B4BC3dAEE5Be518', // Treasury
212        '0xde21F729137C5Af1b01d73aF1dC21eFfa2B8a0d6', // Grants
213      ],
214      vestingAddresses: ['0x44aa9c5a034c1499ec27906e2d427b704b567ffe'],
215      icon: 'QmR8nFrnSu7Mby5tdPPdUrTZttaK7L3TVsZheuwZ1KPUCT',
216      snapshotId: 'gitcoindao.eth',
217      metadata: {
218        name: 'Gitcoin',
219        website: 'https://gitcoin.co',
220        governanceForum: 'https://gov.gitcoin.co',
221      },
222    },
223    {
224      id: 'fei',
225      addresses: [
226        '0x8d5ed43dca8c2f7dfb20cf7b53cc7e593635d7b9', // Core
227        '0xd51dba7a94e1adea403553a8235c302cebf41a3c', // Timelock
228      ],
229      icon: 'QmaeWtW4HDNCKRMTrtE3kabu2xQDtb5iaZduEEm68F7rqR',
230      snapshotId: 'fei.eth',
231      metadata: {
232        name: 'Fei',
233        website: 'https://fei.money',
234        governanceForum: 'https://tribe.fei.money',
235      },
236    },
237
238    { 
239      id: 'idle', 
240      addresses:[
241        '0x69a62C24F16d4914a48919613e8eE330641Bcb94', // Fee Treasury 
242        '0xbecc659bfc6edca552fa1a67451cc6b38a0108e4', // Fee Collector 
243        '0x076ff8e6402b02855ff82119b53e59bbdd67f0ee', // SUSHI Collector
244        '0x107A369bc066c77FF061c7d2420618a6ce31B925', // LongTerm Fund 
245        '0xb0aA1f98523Ec15932dd5fAAC5d86e57115571C7', // Ecosystem Fund 
246        '0x031f71B5369c251a6544c41CE059e6b3d61e42C6', // Reservoir 
247        '0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814', // Treasury League Multisig 
248        '0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b', // Dev League Multisig Wallet 
249      ], 
250      icon: 'QmQZypfk7tLvAo68dtzEwqte2AAsn5SbzxSj48wwva2FdZ',
251      iconType: 'image/png',
252      snapshotId: 'idlefinance.eth' , 
253
254      metadata: { 
255        name: 'Idle DAO',
256        description:'Idle is a decentralized protocol dedicated to bringing automatic asset allocation and yield aggregation to the interest-bearing tokens economy.',
257        website: 'https://idle.finance', 
258        governanceForum: 'https://gov.idle.finance', 
259      },
260    },
261
262    {
263      id: 'index-coop',
264      addresses: ['0x9467cfADC9DE245010dF95Ec6a585A506A8ad5FC'],
265      icon: 'QmcatsG9WgkB6m9vSF3mbgwXFJyG8qSDNsZyi2mEGRk4oa',
266      snapshotId: 'index-coop.eth',
267      metadata: {
268        name: 'Index Coop',
269        website: 'https://indexcoop.com',
270        governanceForum: 'https://gov.indexcoop.com',
271        governanceModel: '',
272      },
273    },
274    {
275      id: 'keeper',
276      addresses: ['0x9a67f1940164d0318612b497e8e6038f902a00a4'],
277      nativeTokens: ['0xfa5047c9c78b8877af97bdcb85db743fd7313d4a'],
278      icon: 'QmQ8Fxi73dFhyYb5LncV7133q4XBwXNvR1hK9aW6aHaQWQ',
279      snapshotId: 'rook.eth',
280      metadata: {
281        name: 'KeeperDAO',
282        website: 'https://keeperdao.com',
283        governanceForum: 'https://forum.keeperdao.com',
284      },
285    },
286    {
287      id: 'lao',
288      addresses: ['0x8f56682a50becb1df2fb8136954f2062871bc7fc'],
289      icon: 'QmcBBSvXC4nUQHSRy5BcGvX7RGWyhzeUifyHNR3e4q26T2',
290      iconType: 'image/jpeg',
291      metadata: {
292        name: 'The LAO',
293        website: 'https://linkswap.app',
294        governanceSite: 'https://app.daohaus.club/dao/0x1/0x8f56682a50becb1df2fb8136954f2062871bc7fc',
295      },
296    },
297    {
298      id: 'lido',
299      addresses: ['0x3e40d73eb977dc6a537af587d48316fee66e9c8c'],
300      icon: 'QmcsGcopqrVyzTLXETtecJuhqxqxbzUvuFMqBd27yFKCMt',
301      metadata: {
302        name: 'Lido',
303        website: 'https://lido.fi',
304        governanceForum: 'https://research.lido.fi',
305        governanceSite: 'https://mainnet.lido.fi/#/lido-dao.aragonid.eth',
306      },
307    },
308    {
309      id: 'linkswap',
310      addresses: ['0xE69A81b96FBF5Cb6CAe95d2cE5323Eff2bA0EAE4'],
311      icon: 'QmdAhG1qWuW6wEcuW29ZjAvqPz8grSYHsR7HZJLSkqkGQ5',
312      snapshotId: 'yflink.eth',
313      metadata: {
314        name: 'Linkswap',
315        website: 'https://linkswap.app',
316        governanceModel: '',
317      },
318    },
319    {
320      id: 'metacartel-ventures',
321      addresses: ['0x4570b4faf71e23942b8b9f934b47ccedf7540162'],
322      icon: 'QmRfpPMV471hsVE4Zz6dTxoAyoNmc2UZPjDr6X8o34QAZz',
323      iconType: 'image/jpeg',
324      metadata: {
325        name: 'MetaCartel Ventures',
326        website: 'https://metacartel.xyz',
327        governanceSite: 'https://app.daohaus.club/dao/0x1/0x4570b4faf71e23942b8b9f934b47ccedf7540162',
328      },
329    },
330    {
331      id: 'mstable',
332      addresses: [
333        '0x3dd46846eed8D147841AE162C8425c08BD8E1b41',
334        '0xfcf455d6eb48b3289a712c0b3bc3c7ee0b0ee4c6', // Funding subDAO
335        '0x67905d3e4fec0c85dce68195f66dc8eb32f59179', // Asset Management subDAO
336      ],
337      icon: 'QmTkxsvMnSPb7A2bPUxA4uJRwJefkyzFgGar5NVxV5UJjr',
338      metadata: {
339        name: 'mStable',
340        website: 'https://mstable.org',
341        governanceSite: 'https://snapshot.page/#/mstable',
342        governanceForum: 'https://forum.mstable.org',
343        governanceModel: '',
344      },
345    },
346    {
347      id: 'nexus',
348      addresses: ['0x586b9b2F8010b284A0197f392156f1A7Eb5e86e9'],
349      icon: 'QmWA5VaHWMH96mLmoaLKaxKVf86GLUJQVBp6BfaUoLH81g',
350      metadata: {
351        name: 'Nexus Mutual',
352        website: 'https://nexusmutual.io/',
353        governanceSite: 'https://app.nexusmutual.io/governance',
354        governanceForum: 'https://forum.nexusmutual.io/',
355        governanceModel: '',
356      },
357    },
358    {
359      id: 'nftx',
360      addresses: ['0x40d73df4f99bae688ce3c23a01022224fe16c7b2'],
361      icon: 'QmU4gtLcxZ4q3Vq27AU1hPdUSxi1o87UESwjNC8DXmCnpH',
362      iconType: 'image/png',
363      metadata: {
364        name: 'NFTX',
365        website: 'https://nftx.io/',
366        governanceForum: 'https://forum.nftx.org/',
367        governanceSite: 'https://client.aragon.org/#/nftx/0xf20e3d05813ce460d42994d26eb4b7d85381d117/',
368      },
369    },
370    {
371      id: 'nouns',
372      addresses: ['0x0BC3807Ec262cB779b38D65b38158acC3bfedE10'],
373      icon: 'QmXCYbSzPAWTUiNuHaFt6AxRkwhq9ho1cDfJ2Vc1Yeb4Js',
374      metadata: {
375        name: 'Nouns DAO',
376        website: 'https://nouns.wtf',
377        governanceSite: 'https://nouns.wtf/vote',
378        governanceForum: 'https://discourse.nouns.wtf',
379      },
380    },
381    {
382      id: 'olympus',
383      addresses: [
384        '0x9A315BdF513367C0377FB36545857d12e85813Ef', // Olympus Treasury v2
385        '0x31F8Cc382c9898b273eff4e0b7626a6987C846E8', // Olympus Treasury v1
386        '0xde7b85f52577b113181921a7aa8fc0c22e309475', // Frax Allocator
387        '0xdbf0683fc4fc8ac11e64a6817d3285ec4f2fc42d', // Convex Allocator - Updated
388        '0x3df5a355457db3a4b5c744b8623a7721bf56df78', // Convex Allocator - Old
389        '0xdFC95aaf0a107DaAe2b350458DED4b7906E7f728', // Convex Holder
390        '0x0316508a1b5abf1CAe42912Dc2C8B9774b682fFC', // Onsen Allocator
391        '0x0e1177e47151Be72e5992E0975000E73Ab5fd9D4', // Aave Allocator
392      ],
393      icon: 'QmbtqUKno2FATf4RFPXAvWCamYrRT6UAKurKiNCuMCJw1J',
394      snapshotId: 'olympusdao.eth',
395      metadata: {
396        name: 'Olympus DAO',
397        website: 'https://olympusdao.finance',
398      },
399    },
400    {
401      id: 'paraswap',
402      addresses: [
403        '0x5a61d9214adefd7669428a03a4e8734a00e9f464', // Main Paraswap MultiSig
404        '0x6DF5e7b236a4F14e08C27E09202B4d1865905e9b', // Operational MultiSig
405      ],
406      vestingAddresses: [
407        '0x6a3CCa09b1C2B83834124c8646a68b9Bad2a07b9', // PSP Reserve Vesting Contract Y1
408        '0x348aa814a72970e76d5756a2cda16e7e8f245aab', // PSP Reserve Vesting Contract Y2
409        '0xb074094d2e858b25d129989644248f9f6946e081', // PSP Reserve Vesting Contract Y3
410        '0x51d2f2c65d043118eb4329fcbc738943f494609f', // PSP Reserve Vesting Contract Y4
411      ],
412      icon: 'QmaxpaLjvz27n3t4piqqR8upEAxmUbX8mixo2cPmR56mbw',
413      iconType: 'image/jpeg',
414      snapshotId: 'paraswap-dao.eth',
415      metadata: {
416        name: 'Paraswap',
417        website: 'https://paraswap.io/',
418        governanceForum: 'https://gov.paraswap.network/',
419      },
420    },
421    {
422      id: 'piedao',
423      addresses: ['0x3bcf3db69897125aa61496fc8a8b55a5e3f245d5'],
424      icon: 'QmahuQPfbqJEE9tXZKfubWPviy5wxesdfBbdUXhf8JRcN4',
425      snapshotId: 'piedao.eth',
426      metadata: {
427        name: 'PieDAO',
428        website: 'https://piedao.org',
429        governanceForum: 'https://forum.piedao.org/',
430      },
431    },
432    {
433      id: 'perpetual',
434      addresses: ['0xd374225abb84dca94e121f0b8a06b93e39ad7a99'],
435      icon: 'QmQf19AsfwAAozFtvhtQmzX4aowJeLDyEB9KV52z5ZKycZ',
436      iconType: 'image/png',
437      snapshotId: 'vote-perp.eth',
438      metadata: {
439        name: 'Perpetual Protocol',
440        website: 'https://www.perp.com/',
441        governanceForum: 'https://gov.perp.fi/',
442      },
443    },
444    {
445      id: 'pleaserdao',
446      addresses: ['0xf5c27c6fe782cbb5c85989ea3e75754748153459'],
447      icon: 'QmQDpmGaDJey2nDzziNUdoVqy76FCqg5XsP1y8ciTpwq7N',
448      iconType: 'image/jpg',
449      metadata: {
450        name: 'PleaserDAO',
451        website: 'https://pleasr.org/',
452      },
453    },
454    {
455      id: 'primedao',
456      addresses: ['0x567d220B0169836cBF351DF70A9c517096ec9De7'],
457      icon: 'QmeYo2DNFPDqYQdDJNwbcHn4zr1eQUTh6zQQapeiRj4HyK',
458      iconType: 'image/png',
459      snapshotId: 'primexyz.eth',
460      metadata: {
461        name: 'PrimeDAO',
462        website: 'https://www.prime.xyz/',
463        governanceForum: 'https://forum.prime.xyz/',
464      },
465    },
466    {
467      id: 'radicle',
468      addresses: ['0x8da8f82d2bbdd896822de723f55d6edf416130ba'],
469      icon: 'QmWQrRGqXBoyMixvVXDfAFEashjX6dj1JZq27qEcAXDoCC',
470      iconType: 'image/jpg',
471      snapshotId: 'gov.radicle.eth',
472      metadata: {
473        name: 'Radicle',
474        website: 'https://radicle.xyz/',
475        governanceForum: 'https://radicle.community/',
476      },
477    },
478    {
479      id: 'rarible',
480      addresses: [
481        '0xfdff6b56cce39482032b27140252ff4f16432785', // RARI treasury
482        '0x1cf0df2a5a20cd61d68d4489eebbf85b8d39e18a'  // other treasury
483      ],
484      icon: 'QmcpJWurowq4eQqCU9mbsxmd7yYfvpgdmv14yz9nDXiRya',
485      iconType: 'image/jpeg',
486      snapshotId: 'rarible.eth',
487      metadata: {
488        name: 'Rarible',
489        website: 'https://rarible.com/',
490        governanceForum: 'https://gov.rarible.org/',
491      },
492    },
493    {
494      id: 'shapeshift',
495      addresses: ['0x90A48D5CF7343B08dA12E067680B4C6dbfE551Be'],
496      nativeTokens: ['0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d'],
497      icon: 'QmWTua7CSYcgb1YZCZZFQ2CvHxJxFyTK3SC1V86czCBTjL',
498      snapshotId: 'shapeshiftdao.eth',
499      metadata: {
500        name: 'ShapeShift',
501        website: 'https://shapeshift.com',
502        governanceForum: 'https://forum.shapeshift.com',
503      },
504    },
505    {
506      id: 'stakeborg',
507      addresses: ['0xF0E1015C33dA062E53fEF545631e75eAD91a5456'],
508      nativeTokens: [
509        '0xDA0c94c73D127eE191955FB46bACd7FF999b2bcd',
510        '0x0acc0fee1d86d2cd5af372615bf59b298d50cd69'
511      ],
512      snapshotId: 'stakeborgdao.eth',
513      icon: 'QmPV95Fa5krahTh17aFTmdUSJcRT5WpVw45SL295LivTWd',
514      iconType: 'image/png',
515      metadata: {
516        name: 'Stakeborg DAO',
517        website: 'https://stakeborgdao.xyz/',
518        governanceForum: 'https://stakeborgdao.xyz/forums/'
519      }
520    },
521    {
522      id: 'sushi',
523      addresses: ['0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3'],
524      icon: 'QmVAko4auvE2NDr8kfnovVqTqujrJ69YrUZQFPZeREMWk5',
525      snapshotId: 'sushigov.eth',
526      metadata: {
527        name: 'SushiSwap',
528        website: 'https://sushi.com',
529        governanceForum: 'https://forum.sushi.com/',
530        governanceModel: '',
531      },
532    },
533    {
534      id: 'synthetix',
535      addresses: [
536        '0xEb3107117FEAd7de89Cd14D463D340A2E6917769', // synthetix DAO
537        '0x86626E1BbBd0ce95ED52e0C5E19f371a6640B591', // grants DAO
538        '0x99f4176ee457afedffcb1839c7ab7a030a5e4a92', // treasury council
539      ],
540      icon: 'QmYPqFXTqYcynD5hT9sZbsoPZXbvjSfL7WWQPL7EwYAyE5',
541      metadata: {
542        name: 'Synthetix',
543        website: 'https://synthetix.io',
544        governanceSite: 'https://staking.synthetix.io/gov',
545        governanceForum: 'https://research.synthetix.io',
546        governanceModel: '',
547      },
548    },
549    {
550        id: 'tempus',
551        addresses: [
552            '0xf41f9fC0B622Eb112445fD7b32fc5190d0c0D3f4', // Treasury
553        ],
554        vestingAddresses: [
555            '0xCa65E71EE7Fb8E85eDe0E7Ef30F029efa8FE4a08', // Vesting Contract
556        ],
557        icon: 'QmWqzVRqhKxG28DqdBDdUbBDXnzE6tP1ymgGhH6SAkaBM4',
558        snapshotId: 'tempusgov.eth',
559        metadata: {
560            name: 'Tempus',
561            website: 'https://tempus.finance/',
562            governanceSite: 'https://vote.tempus.finance/',
563            governanceForum: 'https://forum.tempus.finance/',
564        },
565    },
566    {
567      id: 'tornado',
568      addresses: ['0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce'],
569      vestingAddresses: ['0x179f48C78f57A3A78f0608cC9197B8972921d1D2'],
570      icon: 'QmeUzPPCdpqEYArWyMdUVZJk4GUmuR4TAkK6U4eb9vZDPa',
571      metadata: {
572        name: 'Tornado Cash',
573        website: 'https://tornado.cash',
574        governanceSite: 'https://app.tornado.cash/governance',
575        governanceForum: 'https://torn.community',
576        governanceModel: '',
577      },
578    },
579    {
580      id: 'uniswap',
581      addresses: [
582        '0x1a9c8182c09f50c8318d769245bea52c32be35bc', // treasury
583      ],
584      vestingAddresses: [
585        '0x4750c43867ef5f89869132eccf19b9b6c4286e1a',
586        '0xe3953d9d317b834592ab58ab2c7a6ad22b54075d',
587        '0x4b4e140d1f131fdad6fb59c13af796fd194e4135',
588        '0x3d30b1ab88d487b0f3061f40de76845bec3f1e94',
589      ],
590      icon: 'QmPXoiG66a9gCDX1NX51crWV7UAijoFd5wycHrfRKM6Y1n',
591      metadata: {
592        name: 'Uniswap',
593        website: 'https://uniswap.org',
594        governanceSite: 'https://app.uniswap.org/#/vote',
595        governanceForum: 'https://gov.uniswap.org',
596        governanceModel: '',
597      },
598      getProposals: async (sdk: Context) => {
599        const query = `{
600          proposals(
601            first: 5,
602            orderBy: creationTime,
603            orderDirection: desc
604          ) {
605            id
606            description
607            creationTime
608            status
609          }
610        }`
611        const { proposals } = await sdk.graph.query('arr00/uniswap-governance-v3', query);
612        return proposals.map((proposal: any) => ({
613          title: proposal.description.split(/\n|  /)[0],
614          start: proposal.creationTime,
615          state: proposal.status,
616          link: `https://app.uniswap.org/#/vote/${proposal.id.replace('.', '/')}`,
617        }))
618      }
619    },
620    {
621      id: 'unslashed',
622      addresses: ['0xf5be8b4c82b8a681bacf357cfb712ab9e9296cb2'],
623      icon: 'QmUjoauefQRJZCoEbDL7wRQYGkr4FbpYfHu4HC7LLJ4Qmc',
624      iconType: 'image/jpg',
625      snapshotId: 'unslashed.eth',
626      metadata: {
627        name: 'Unslashed Finance',
628        website: 'https://unslashed.finance/',
629        governanceForum: 'https://forum.unslashed.finance/',
630      },
631    },
632    {
633      id: 'yam',
634      addresses: [
635        '0x97990B693835da58A281636296D2Bf02787DEa17', // treasury
636        '0xd67c05523d8ec1c60760fd017ef006b9f6e496d0', // sushiTreasury
637        '0x205cc7463267861002b27021c7108bc230603d0f', // stakedDPI
638        '0xd67c05523d8ec1c60760fd017ef006b9f6e496d0', // randomHoldings
639      ],
640      icon: 'QmcPjtA1Q9QhnAeruXkrsYU3HZ5b8sm3eU78VUjHDXhior',
641      iconType: 'image/png',
642      snapshotId: 'yam',
643      metadata: {
644        name: 'Yam Finance',
645        website: 'https://yam.finance',
646        governanceForum: 'https://forum.yam.finance',
647        governanceModel: '',
648      },
649    },
650    {
651      id: 'yearn',
652      addresses: [
653        '0xfeb4acf3df3cdea7399794d0869ef76a6efaff52', // ychad.eth
654        '0x93A62dA5a14C80f265DAbC077fCEE437B1a0Efde', // treasury.ychad.eth
655        '0xd42e1cb8b98382df7db43e0f09dfe57365659d16', // DSProxy
656      ],
657      icon: 'QmYGdvDA6jM5AV1yBvQKUAz74wqGeBUwVohBWEgbwqXpjk',
658      snapshotId: 'yearn',
659      metadata: {
660        name: 'Yearn',
661        website: 'https://yearn.finance',
662        governanceForum: 'https://gov.yearn.finance',
663        governanceModel: '',
664      },
665    },
666  ];
667
668  async function getSnapshotProposals(id: string) {
669    const response = await sdk.http.post('https://hub.snapshot.org/graphql', {
670      query: `query Proposals($space: String!) {
671        proposals (
672          first: 5,
673          skip: 0,
674          where: { space_in: [$space] },
675          orderBy: "created",
676          orderDirection: desc
677        ) {
678          id
679          title
680          start
681          end
682          state
683          link
684        }
685      }`,
686      variables: { space: id },
687    });
688
689    return response.data.proposals;
690  }
691
692  const portfolioCache: { [addresses: string]: Promise<any> } = {}
693  const getPortfolio = (addresses: string[]): Promise<any> => {
694    const key = addresses.join(',')
695    if (!portfolioCache[key]) {
696      portfolioCache[key] = sdk.http.get(`https://zerion-api.vercel.app/api/portfolio/${key}`)
697        .then(result => {
698          if (result.success) {
699            return result.value
700          }
701          throw new Error(`Request to 'https://zerion-api.vercel.app/api/portfolio/${key}' failed: ${result.message}`)
702        });
703    }
704    return portfolioCache[key];
705  }
706
707  const createTreasuryLoader = (addresses: string[]) => async () => {
708    const portfolio = await getPortfolio(addresses)
709    return portfolio.totalValue
710  }
711
712  const createPortfolioLoader = (addresses: string[], vestingAddresses?: string[]) => async () => {
713    const [{ portfolio }, { portfolio: vestingPortfolio }] = await Promise.all([
714      getPortfolio(addresses),
715      vestingAddresses ? getPortfolio(vestingAddresses) : { portfolio: [] },
716    ]);
717
718    return [
719      ...portfolio,
720      ...vestingPortfolio.map((portfolioItem: any) => ({ ...portfolioItem, vesting: true }))
721    ];
722  };
723
724  for (const org of orgs) {
725    let recentProposals = async () => []
726    if (org.getProposals) {
727      recentProposals = () => org.getProposals!(sdk)
728    } else if (org.snapshotId) {
729      recentProposals = () => getSnapshotProposals(org.snapshotId!)
730    }
731
732    sdk.register({
733      id: org.id,
734      queries: {
735        currentTreasuryUSD: createTreasuryLoader([...org.addresses, ...(org.vestingAddresses || [])]),
736        currentLiquidTreasuryUSD: createTreasuryLoader(org.addresses),
737        currentTreasuryPortfolio: createPortfolioLoader(org.addresses, org.vestingAddresses),
738        recentProposals,
739      },
740      metadata: {
741        ...org.metadata,
742        governanceSite: org.snapshotId
743          ? `https://snapshot.org/#/${org.snapshotId}`
744          : org.governanceSite || null,
745        icon: org.icon ? sdk.ipfs.getDataURILoader(org.icon, org.iconType || 'image/svg+xml') : 0,
746        category: 'app',
747        treasuries: [...org.addresses, ...(org.vestingAddresses || [])],
748      },
749    });
750  }
751}
752

It's something off?

Report it to the discussion board on Discord, we will take care of it.

Adapter Info

Version

0.1.23

License

MIT

IPFS CID

QmYf7XMqWJnu4QYQKJdS9WrzsF5Ctn8iWGSpM5Wi2q9Vjp

CID (source)

QmZXFptoghNFG1SsgpHawcvN4fHEKigrqF3gSjeGVUqDWZ

Collections

Author

0xBC59E2FBa74b5f28aAcEE4fd9e4465154f32C0b4