Skip to content

Commit

Permalink
Add Gnosis deploy and xdai logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bfullam committed Apr 21, 2024
1 parent b0e4bd9 commit 2d87b08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ const Home: NextPage = () => {
.then(data => {
const tokensThatPairWithEth = data.data.pools.reduce((acc: any, pool: any) => {
// Check if the pool is an ETH pool and has liquidity
const isEthPool = pool.token0.symbol === "WETH" || pool.token1.symbol === "WETH";
const currentChainEth = chainId === 100 ? "XDAI" : "WETH"; // Gnosis uses XDAI instead of ETH
const isEthPool = pool.token0.symbol === currentChainEth || pool.token1.symbol === currentChainEth;
const hasLiquidity = pool.liquidity > 0;
if (!isEthPool || !hasLiquidity) {
return acc;
}

// Organize the data by token, so we can see all the pools for each token with their liquidity and feeTier
const nonEthToken = pool.token0.symbol === "WETH" ? pool.token1 : pool.token0;
const nonEthToken = pool.token0.symbol === currentChainEth ? pool.token1 : pool.token0;
if (acc[nonEthToken.id]) {
return {
...acc,
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
const deployedContracts = {
100: {
Bundle6551Implementation: {
address: "0xDb6E00CE359650907b44a690A47c8E9ebE63F4a9",
address: "0xA74dB94F04DBcb807650c6eEf9f3AE235F0795d9",
abi: [
{
type: "receive",
Expand Down Expand Up @@ -273,7 +273,7 @@ const deployedContracts = {
inheritedFunctions: {},
},
BundlrNft: {
address: "0x0c90524adD7ECdca9FB27311510FBdA80c7Bf91d",
address: "0xA156ff8a642AB3Aa2635Ba40c5c96570607E54Ec",
abi: [
{
type: "constructor",
Expand Down

0 comments on commit 2d87b08

Please sign in to comment.