Skip to content

Commit

Permalink
Merge branch 'main' into mohitthakkar30/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Manh Cao committed Oct 4, 2024
2 parents 462d877 + 0dfb247 commit 962b517
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The JSON file includes details for multiple objects (PT, YT, LP), each correspon
#### Protocols fields

- name: The name of the protocol.
- icon: The protocol’s logo (circular logo in PNG). The string on this field should be the same as the name of the logo file uploaded
- icon: The protocol’s logo (circular logo in PNG). The string on this field should be the same as the name of the logo file uploaded. Size limit for logo is 20KB.
- metadata: This section contains detailed information about the protocol's integration assets.

#### Asset fields
Expand Down
104 changes: 97 additions & 7 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
}
]
},
"hash": "8f088fee7361150dca206319c3e9c837"
"hash": "77d931fda9e93e07648fdb982c22ae45"
},
{
"id": "cega",
Expand Down Expand Up @@ -179,12 +179,42 @@
"address": "0x1fa42e6730df74ff2742704761da41111bb7f019",
"integrationUrl": "https://app.contango.xyz/strategies/farming/usd-stablecoins?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 42161,
"address": "0x355ec27c9d4530de01a103fa27f884a2f3da65ef",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 42161,
"address": "0xe2b2d203577c7cb3d043e89ccf90b5e24d19b66f",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0xf6fd7ceb095bfd54130359cc9366a1493944213a",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0xb07b9fdd62dc478e521e8bde3630a777725b0eb4",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0x6ee2b5e19ecba773a352e5b21415dc419a700d1d",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
}
],
"yt": [],
"lp": []
},
"hash": "9915255fd06766994bf53a45f81584ad"
"hash": "00f2c6db8ea2d3f7de8e5bc1135c4a6c"
},
{
"id": "index-coop",
Expand Down Expand Up @@ -214,7 +244,7 @@
"yt": [],
"lp": []
},
"hash": "4070155c274c35af989c4a3bc770db80"
"hash": "1b0f7d58a6a44740a1201e40e3f2eb34"
},
{
"id": "marginly",
Expand Down Expand Up @@ -262,7 +292,7 @@
"yt": [],
"lp": []
},
"hash": "491aa773ce939c7df3c0a3467a8fd8a8"
"hash": "a809a66c08d1be4c5e39c964123f01bb"
},
{
"id": "pichi",
Expand Down Expand Up @@ -312,7 +342,67 @@
}
]
},
"hash": "a770b3ae57e3f697379e9e432f5ea9b6"
"hash": "71fb37f33a2a5fe5b08fb804f25e496e"
},
{
"id": "silo",
"name": "Silo",
"icon": "logo.png",
"metadata": {
"pt": [
{
"chainId": 1,
"address": "0x6ee2b5e19ecba773a352e5b21415dc419a700d1d",
"integrationUrl": "https://app.silo.finance/silo/0xa2AED60DbDd09c91C2e686E948592dc1c1Cd0cc6",
"description": "Deposit PT-eETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xf6fd7ceb095bfd54130359cc9366a1493944213a",
"integrationUrl": "https://app.silo.finance/silo/0xD48043A0f99501A057CE1De4C09d982BB433aBAC",
"description": "Deposit PT-pufETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xb07b9fdd62dc478e521e8bde3630a777725b0eb4",
"integrationUrl": "https://app.silo.finance/silo/0xF94f40873e662086666bdA3eC58801AC35B2921a",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xf7906f274c174a52d444175729e3fa98f9bde285",
"integrationUrl": "https://app.silo.finance/silo/0xC47429cba84F8128559958c970Df5BC6CA2B9c89",
"description": "Deposit PT-ezETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0xe2b2d203577c7cb3d043e89ccf90b5e24d19b66f",
"integrationUrl": "https://app.silo.finance/silo/0x1E5B48F3130502FFD1DFb6d24AC3C42269e41538",
"description": "Deposit PT-eETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0xe2b2d203577c7cb3d043e89ccf90b5e24d19b66f",
"integrationUrl": "https://app.silo.finance/silo/0x00b7BBDd582Ef58445aA87Ac6Beb61F5fA36e71b",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0x355ec27c9d4530de01a103fa27f884a2f3da65ef",
"integrationUrl": "https://app.silo.finance/silo/0x00b7BBDd582Ef58445aA87Ac6Beb61F5fA36e71b",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0x1fa42e6730df74ff2742704761da41111bb7f019",
"integrationUrl": "https://app.silo.finance/silo/0x1e2968B3e23D625906F32A94dbFe2F44930c6Db7",
"description": "Deposit PT-USDe(28 Nov) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
}
],
"yt": [],
"lp": []
},
"hash": "0ffa14bbac8ac2ebc4d05ee5a50bb15a"
},
{
"id": "venus",
Expand All @@ -330,7 +420,7 @@
"yt": [],
"lp": []
},
"hash": "8061ad48a21285f93f492b83cc3534bc"
"hash": "9cb9392b65438ca9fe4f7d6a3e8e0fc9"
},
{
"id": "yearn",
Expand Down Expand Up @@ -558,7 +648,7 @@
"yt": [],
"lp": []
},
"hash": "adde1e5f670bbe484865804caedf8ddd"
"hash": "6e41a2d11bd3b6d2367b03fa35a3aaa7"
}
]
}
Binary file modified protocols/beefy/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions protocols/contango/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,36 @@
"address": "0x1fa42e6730df74ff2742704761da41111bb7f019",
"integrationUrl": "https://app.contango.xyz/strategies/farming/usd-stablecoins?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 42161,
"address": "0x355ec27c9d4530de01a103fa27f884a2f3da65ef",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 42161,
"address": "0xe2b2d203577c7cb3d043e89ccf90b5e24d19b66f",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=42161",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0xf6fd7ceb095bfd54130359cc9366a1493944213a",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0xb07b9fdd62dc478e521e8bde3630a777725b0eb4",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
},
{
"chainId": 1,
"address": "0x6ee2b5e19ecba773a352e5b21415dc419a700d1d",
"integrationUrl": "https://app.contango.xyz/strategies/leveraged-staking/eth?selectedChains=1",
"description": "PT leverage looping through various supported money markets"
}
],
"yt": [],
Expand Down
Binary file modified protocols/contango/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified protocols/index-coop/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified protocols/origami/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified protocols/pichi/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions protocols/silo/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "Silo",
"icon": "logo.png",
"metadata": {
"pt": [
{
"chainId": 1,
"address": "0x6ee2b5E19ECBa773a352E5B21415Dc419A700d1d",
"integrationUrl": "https://app.silo.finance/silo/0xa2AED60DbDd09c91C2e686E948592dc1c1Cd0cc6",
"description": "Deposit PT-eETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xF6fd7Ceb095BfD54130359Cc9366a1493944213A",
"integrationUrl": "https://app.silo.finance/silo/0xD48043A0f99501A057CE1De4C09d982BB433aBAC",
"description": "Deposit PT-pufETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xB07b9fDd62DC478E521E8bDe3630a777725B0eB4",
"integrationUrl": "https://app.silo.finance/silo/0xF94f40873e662086666bdA3eC58801AC35B2921a",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 1,
"address": "0xf7906F274c174A52d444175729E3fa98f9bde285",
"integrationUrl": "https://app.silo.finance/silo/0xC47429cba84F8128559958c970Df5BC6CA2B9c89",
"description": "Deposit PT-ezETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0xE2B2D203577c7cb3D043E89cCf90b5E24d19b66f",
"integrationUrl": "https://app.silo.finance/silo/0x1E5B48F3130502FFD1DFb6d24AC3C42269e41538",
"description": "Deposit PT-eETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0xE2B2D203577c7cb3D043E89cCf90b5E24d19b66f",
"integrationUrl": "https://app.silo.finance/silo/0x00b7BBDd582Ef58445aA87Ac6Beb61F5fA36e71b",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0x355ec27c9d4530dE01A103FA27F884a2F3dA65ef",
"integrationUrl": "https://app.silo.finance/silo/0x00b7BBDd582Ef58445aA87Ac6Beb61F5fA36e71b",
"description": "Deposit PT-rsETH(26 Dec) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
},
{
"chainId": 42161,
"address": "0x1FA42e6730DF74fF2742704761Da41111bB7F019",
"integrationUrl": "https://app.silo.finance/silo/0x1e2968B3e23D625906F32A94dbFe2F44930c6Db7",
"description": "Deposit PT-USDe(28 Nov) into Silo’s isolated lending marks to borrow ETH/USDC and earn additional rewards."
}
],
"yt": [],
"lp": []
}
}
Binary file added protocols/silo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified protocols/venus/venus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified protocols/zerolend/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions validate-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const fs = require('fs');
const path = require('path');

const LIMIT_ICON_KB_SIZE = 20;

function isValidEthereumAddress(address) {
const ethereumAddressPattern = /^0x[a-fA-F0-9]{40}$/;
return ethereumAddressPattern.test(address);
Expand Down Expand Up @@ -95,6 +97,16 @@ function validateConfig(protocol, assetMap) {
throw new Error(`protocol ${protocol}: icon path not found for protocol ${icon}`);
}

const iconStats = fs.statSync(iconPath);
if (iconStats.isDirectory()) {
throw new Error(`protocol ${protocol}: icon must be a png file`);
}

if (iconStats.size > LIMIT_ICON_KB_SIZE * 1024) {
throw new Error(`protocol ${protocol}: icon size must be less than ${LIMIT_ICON_KB_SIZE}KB file`);
}


const {pt, yt, lp} = metadata;
checkMetadataField(pt, protocol, 'pt', ptMap);
checkMetadataField(yt, protocol, 'yt', ytMap);
Expand Down

0 comments on commit 962b517

Please sign in to comment.