@admin-jigsaw/jigsaw-sdk
Version:
Returns predefined data for Jigsaw platform and exposes functionality to retrieve the necessary data
136 lines (135 loc) • 4.49 kB
JavaScript
export const COLLATERALS_SONIC = {
// Stablecoins
USDC: {
name: "USD Coin",
symbol: "USDC",
displaySymbol: "USDC",
icon: "/assets/coins/usdc.webp",
address: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
id: "usd-coin",
decimals: 6,
},
// scUSD: {
// name: 'Rings scUSD',
// symbol: 'scUSD',
// displaySymbol: 'scUSD',
// icon: '/assets/coins/scUSD.webp',
// address: '0xd3DCe716f3eF535C5Ff8d041c1A41C3bd89b97aE' as Address,
// decimals: 6,
// id: 'rings-scusd',
// },
// wstkscUSD: {
// name: 'Wrapped stkscUSD',
// symbol: 'wstkscUSD',
// displaySymbol: 'wstkscUSD',
// icon: '/assets/coins/scUSD.webp',
// address: '0x9fb76f7ce5fceaa2c42887ff441d46095e494206' as Address,
// id: 'wrapped-stkscusd',
// decimals: 6,
// },
// Majors
WETH: {
name: "Wrapped Ether",
symbol: "WETH",
displaySymbol: "WETH",
icon: "/assets/coins/weth.webp",
address: "0x50c42dEAcD8Fc9773493ED674b675bE577f2634b",
id: "ethereum", // 'bridged-wrapped-ether-sonic' - actual ID of WETH on Sonic, but in specs it was requested to use ETH ID
decimals: 18,
},
wS: {
name: "Wrapped Sonic",
symbol: "wS",
displaySymbol: "wS",
icon: "/assets/coins/wrapped_sonic.webp",
address: "0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38",
id: "sonic-3", // 'wrapped-sonic' - actual ID of wS on Sonic, but in specs it was requested to use S ID
decimals: 18,
},
S: {
name: "Sonic Native Coin",
symbol: "S",
displaySymbol: "S",
icon: "/assets/coins/sonic.webp",
address: null,
id: "sonic-3",
},
// Liquid Restaking Tokens (LRTs)
// stS: {
// name: 'Beets Staked Sonic',
// symbol: 'stS',
// displaySymbol: 'stS',
// icon: '/assets/coins/stS.webp',
// address: '0xe5da20f15420ad15de0fa650600afc998bbe3955' as Address,
// id: 'beets-staked-sonic',
// decimals: 18,
// },
// wOS: {
// name: 'Wrapped Origin Sonic',
// symbol: 'wOS',
// displaySymbol: 'wOS',
// icon: '/assets/coins/wOS.webp',
// address: '0x9f0df7799f6fdad409300080cff680f5a23df4b1' as Address,
// id: 'wrapped-sonic-origin',
// decimals: 18,
// },
// wstkscETH: {
// name: 'Wrapped stkscETH',
// symbol: 'wstkscETH',
// displaySymbol: 'wstkscETH',
// icon: '/assets/coins/wOS.webp',
// address: '0xE8a41c62BB4d5863C6eadC96792cFE90A1f37C47' as Address,
// id: 'rings-sc-eth', // used ID of Sonic ETH, TODO: search for alternative or confirm with Hovo
// decimals: 18,
// },
// Jigsaw Coin
jUSD: {
name: "Jigsaw USD",
symbol: "jUSD",
displaySymbol: "jUSD",
icon: "/assets/coins/jUSD.svg",
address: "0x0000000607eaC6bA4c6Fb409B2E6903Bbef38Dce",
decimals: 18,
id: "jigsaw-usd",
},
};
export const REWARD_TOKENS_SONIC = {
PENDLE: {
name: "Pendle",
symbol: "PENDLE",
displaySymbol: "PENDLE",
icon: "/assets/coins/pendle.webp",
address: "0x808507121B80c02388fAd14726482e061B8da827",
id: "pendle",
decimals: 18,
},
};
export const COLLATERALS_GROUPS_SONIC = [
{
name: "Stablecoins",
coins: [COLLATERALS_SONIC.USDC],
},
{
name: "Majors",
coins: [COLLATERALS_SONIC.WETH, COLLATERALS_SONIC.wS, COLLATERALS_SONIC.S],
},
];
export const COLLATERALS_GROUPS_WITH_REWARDS_SONIC = [
...COLLATERALS_GROUPS_SONIC,
{
name: "Reward tokens",
coins: [REWARD_TOKENS_SONIC.PENDLE],
},
];
// The assets we can deposit
export const SYMBOLS_ALL_SONIC = Object.keys(COLLATERALS_SONIC);
export const SYMBOLS_BASE_SONIC = SYMBOLS_ALL_SONIC.filter((symbol) => symbol !== COLLATERALS_SONIC.jUSD.symbol &&
symbol !== COLLATERALS_SONIC.S.symbol);
// Keep base separated from form-related lists in case we want to adjust a specific list in the future
export const SYMBOLS_BORROW_SONIC = SYMBOLS_BASE_SONIC;
export const SYMBOLS_DEPOSIT_SONIC = SYMBOLS_ALL_SONIC.filter((symbol) => symbol !== COLLATERALS_SONIC.jUSD.symbol);
// TODO: jUSD can be done withdrawable in the future
export const SYMBOLS_WITHDRAW_SONIC = [
...SYMBOLS_BASE_SONIC,
...Object.keys(REWARD_TOKENS_SONIC),
];