Skip to content

Commit

Permalink
feat(tokens): add support for sSTRK token and pools
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdevcollins committed Dec 20, 2024
1 parent c8b2b74 commit 071014c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
23 changes: 22 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ const LOGOS = {
WBTC: '/zklend/icons/tokens/wbtc.svg?w=20',
ETH: '/zklend/icons/tokens/eth.svg?w=20',
STRK: '/zklend/icons/tokens/strk.svg?w=20',
sSTRK: '/zklend/icons/tokens/strk.svg?w=20',
DAI: '/zklend/icons/tokens/dai.svg?w=20',
};

export type TokenName = 'USDT' | 'USDC' | 'ETH' | 'STRK' | 'WBTC' | 'DAI';
export type TokenName =
| 'USDT'
| 'USDC'
| 'ETH'
| 'STRK'
| 'sSTRK'
| 'WBTC'
| 'DAI';

const CONSTANTS = {
DEX_INCENTIVE_URL:
Expand Down Expand Up @@ -77,6 +85,19 @@ const CONSTANTS = {
};

export const TOKENS: TokenInfo[] = [
{
token: standariseAddress(
'0x0260c02fd6942c788b8905d2c1b98b5a98fffd2ec0dfb013aa4b148781e269b6',
),
name: 'sSTRK',
decimals: 18,
displayDecimals: 2,
logo: CONSTANTS.LOGOS.STRK,
minAmount: MyNumber.fromEther('10', 18),
maxAmount: MyNumber.fromEther('10000', 18),
stepAmount: MyNumber.fromEther('10', 18),
isERC4626: false,
},
{
token: '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7',
name: 'ETH',
Expand Down
3 changes: 3 additions & 0 deletions src/store/ekobu.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ export class Ekubo extends IDapp<EkuboBaseAprDoc> {
'USDT',
'ETH',
'STRK',
'sSTRK/USDC',
'sSTRK/ETH',
'sSTRK',
];
console.log('filter2', poolName, supportedPools.includes(poolName));
return supportedPools.includes(poolName);
Expand Down
9 changes: 8 additions & 1 deletion src/store/nostradex.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ export class NostraDex extends Jediswap {
if (!myData) return [];
const pools: PoolInfo[] = [];

const supportedPools = ['ETH-USDC', 'STRK-ETH', 'STRK-USDC', 'USDC-USDT'];
const supportedPools = [
'ETH-USDC',
'STRK-ETH',
'STRK-USDC',
'USDC-USDT',
'sSTRK-ETH',
'sSTRK-USDC',
];
// Filter and map only the required pools
Object.values(myData)
.filter((poolData: any) => {
Expand Down

0 comments on commit 071014c

Please sign in to comment.