Skip to content

Commit

Permalink
feat: gnosis paraswap adapters (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem authored Nov 19, 2024
1 parent 0e72bd5 commit 8cfafd0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@aave/contract-helpers": "1.30.5",
"@aave/math-utils": "1.30.5",
"@bgd-labs/aave-address-book": "4.2",
"@bgd-labs/aave-address-book": "4.4.0",
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/server": "latest",
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/paraswap/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
AaveV3Base,
AaveV3BNB,
AaveV3Ethereum,
AaveV3Gnosis,
AaveV3Optimism,
AaveV3Polygon,
} from '@bgd-labs/aave-address-book';
Expand Down Expand Up @@ -95,6 +96,7 @@ const paraswapNetworks: ParaswapChainMap = {
},
[ChainId.base]: { paraswap: ParaSwap(ChainId.base), feeTarget: AaveV3Base.COLLECTOR },
[ChainId.bnb]: { paraswap: ParaSwap(ChainId.bnb), feeTarget: AaveV3BNB.COLLECTOR },
[ChainId.xdai]: { paraswap: ParaSwap(ChainId.xdai), feeTarget: AaveV3Gnosis.COLLECTOR },
};

export const getParaswap = (chainId: ChainId) => {
Expand Down
13 changes: 12 additions & 1 deletion src/ui-config/marketsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,26 @@ export const marketsData: {
market: CustomMarket.proto_gnosis_v3,
chainId: ChainId.xdai,
v3: true,
enabledFeatures: {
liquiditySwap: true,
collateralRepay: true,
debtSwitch: true,
withdrawAndSwitch: true,
switch: false,
},
subgraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${apiKey}/subgraphs/id/HtcDaL8L8iZ2KQNNS44EBVmLruzxuNAz1RkBYdui1QUT`,
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV3Gnosis.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV3Gnosis.POOL,
WETH_GATEWAY: '0x7B9c12915c594a68dE96201Cbdc79147F09da278', // AaveV3Gnosis.WETH_GATEWAY,
WETH_GATEWAY: AaveV3Gnosis.WETH_GATEWAY,
REPAY_WITH_COLLATERAL_ADAPTER: AaveV3Gnosis.REPAY_WITH_COLLATERAL_ADAPTER,
SWAP_COLLATERAL_ADAPTER: AaveV3Gnosis.SWAP_COLLATERAL_ADAPTER,
WALLET_BALANCE_PROVIDER: AaveV3Gnosis.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Gnosis.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Gnosis.UI_INCENTIVE_DATA_PROVIDER,
COLLECTOR: AaveV3Gnosis.COLLECTOR,
DEBT_SWITCH_ADAPTER: AaveV3Gnosis.DEBT_SWAP_ADAPTER,
WITHDRAW_SWITCH_ADAPTER: AaveV3Gnosis.WITHDRAW_SWAP_ADAPTER,
},
},
[CustomMarket.proto_bnb_v3]: {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1317,10 +1317,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bgd-labs/aave-address-book@4.2":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.2.0.tgz#768b069a264491c381647679f8daf761e69200d3"
integrity sha512-FBMeAySqu4oBfefJpuNR9KVy0qvL+hr/N05BiqHhI+uma0EleGl1SvHo3mtb0Faqjq71krEXRYAdwGer5F7o9g==
"@bgd-labs/aave-address-book@4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.4.0.tgz#9afc34ff87a4f1d32af39f5df1c3b52f5d78b129"
integrity sha512-wEWhdTpqy6PwB3Dc772nX1lF1dQr9qmnmKJHcYKpP/VFBYztxunoZS/c26iKH4SP/DRXwDnMbZcnRkebC73bDA==

"@coinbase/[email protected]", "@coinbase/wallet-sdk@^3.0.4":
version "3.1.0"
Expand Down

3 comments on commit 8cfafd0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

Please sign in to comment.