Skip to content

Commit

Permalink
feat: sonic's market
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrabina committed Feb 25, 2025
1 parent 87a87a1 commit c0d225f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/ui-config/marketsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
AaveV3Scroll,
AaveV3ScrollSepolia,
AaveV3Sepolia,
AaveV3Sonic,
AaveV3ZkSync,
} from '@bgd-labs/aave-address-book';
import { ReactNode } from 'react';
Expand Down Expand Up @@ -94,6 +95,7 @@ export enum CustomMarket {
proto_zksync_v3 = 'proto_zksync_v3',
proto_etherfi_v3 = 'proto_etherfi_v3',
proto_linea_v3 = 'proto_linea_v3',
proto_sonic_v3 = 'proto_sonic_v3',
// v2
proto_mainnet = 'proto_mainnet',
proto_avalanche = 'proto_avalanche',
Expand Down Expand Up @@ -699,4 +701,20 @@ export const marketsData: {
COLLECTOR: AaveV3Linea.COLLECTOR,
},
},
[CustomMarket.proto_sonic_v3]: {
marketTitle: 'Sonic',
market: CustomMarket.proto_sonic_v3,
chainId: ChainId.sonic,
v3: true,
// subgraphUrl: ``, // TODO: add subgraph url (waiting for fix)
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV3Sonic.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV3Sonic.POOL,
WETH_GATEWAY: AaveV3Sonic.WETH_GATEWAY,
WALLET_BALANCE_PROVIDER: AaveV3Sonic.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Sonic.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Sonic.UI_INCENTIVE_DATA_PROVIDER,
COLLECTOR: AaveV3Sonic.COLLECTOR,
},
},
} as const;
13 changes: 13 additions & 0 deletions src/ui-config/permitConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { ChainId } from '@aave/contract-helpers';

/**
* Maps token permit support by chain and token address.
* Permit enables gasless approvals using signed messages (EIP-2612).
*
* To check if a token supports permit, check if the contract has a permit function in the chain's scanner
* or in the contract's source code.
* To get the list of tokens supported by market, refer to the governance proposal.
*/
export const permitByChainAndToken: {
[chainId: number]: Record<string, boolean>;
} = {
Expand Down Expand Up @@ -46,4 +54,9 @@ export const permitByChainAndToken: {
'0x2416092f143378750bb29b79ed961ab195cceea5': true, // ezETH
'0xb5bedd42000b71fdde22d3ee8a79bd49a568fc8f': true, // wstETH
},
[ChainId.sonic]: {
'0x50c42dEAcD8Fc9773493ED674b675bE577f2634b': false, // WETH
'0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38': false, // wS
'0x29219dd400f2Bf60E5a23d13Be72B486D4038894': false, // USDC.e
},
};

0 comments on commit c0d225f

Please sign in to comment.