Skip to content

Commit

Permalink
bridge between optimism and base link tokens enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
SarveshLimaye committed Nov 16, 2024
1 parent bd0fe3e commit 7981aa4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const nextConfig: NextConfig = {
/* config options here */
reactStrictMode: true,
images: {
domains: ["cryptologos.cc"],
domains: ["cryptologos.cc", "i.seadn.io"],
dangerouslyAllowSVG: true, // Add your image host domain here
},
};
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/Bridge/Bridge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ export default function Bridge() {
);
console.log(amountToPass);

console.log(address);

const ccipFees = await poolContract.getCcipFeesForBridging(
amountToPass,
address!,
Expand Down
37 changes: 37 additions & 0 deletions frontend/src/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,35 @@ export const chains = [
},
],
},
{
id: 84532,
name: "Base Sepolia",
logo: "https://i.seadn.io/gcs/files/f75d772fba8058dbbbefbc0578bae807.png?auto=format&dpr=1&w=384",
factoryAddress: "0x275fC6E5b9BCE1b756EacA955b7758070099e07d",
tokens: [
{
symbol: "LINK",
name: "Chainlink",
address: "0xE4aB69C077896252FAFBD49EFD26B5D171A32410",
logo: "https://cryptologos.cc/logos/chainlink-link-logo.svg?v=025",
},
],
},

{
id: 11155420,
name: "Optimism Sepolia",
logo: "https://cryptologos.cc/logos/optimism-ethereum-op-logo.png?v=025",
factoryAddress: "0xfa24eaD3De76045f875998dd1d75562057cEB26d",
tokens: [
{
symbol: "LINK",
name: "Chainlink",
address: "0xE4aB69C077896252FAFBD49EFD26B5D171A32410",
logo: "https://cryptologos.cc/logos/chainlink-link-logo.svg?v=025",
},
],
},
];

export const SEPOLIA_CHAIN_ID = 11155111;
Expand All @@ -97,6 +126,10 @@ export const CARDONA_CHAIN_ID = 2442;

export const ARBITUM_SEPOLIA_CHAIN_ID = 421614;

export const OPTIMISM_SEPOLIA_CHAIN_ID = 11155420;

export const BASE_SEPOLIA_CHAIN_ID = 84532;

export const NATIVE_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";

export const UNIFIED_BRIDGE = "0x528e26b25a34a4a5d0dbda1d57d318153d2ed582";
Expand Down Expand Up @@ -128,5 +161,9 @@ export const getPoolAddress = (srcChainId: number) => {
return "0x29277F9207Ff093c206292c28406Ee51e1605166";
} else if (srcChainId === ARBITUM_SEPOLIA_CHAIN_ID) {
return "0xD255FBb48513e92c7D7e2a16769dDDE92d8698E6";
} else if (srcChainId === BASE_SEPOLIA_CHAIN_ID) {
return "0x0ffb63091d69A3c050FA5A788A68cff304F76ae6";
} else if (srcChainId === OPTIMISM_SEPOLIA_CHAIN_ID) {
return "0xDAd3276564bEC357300F3cD7B852015ADc278A42";
}
};
10 changes: 10 additions & 0 deletions frontend/src/utils/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
arbitrumSepolia,
scrollSepolia,
lineaSepolia,
baseSepolia,
optimismSepolia,
} from "wagmi/chains";
import { type ReactNode, useState } from "react";
import { type State, WagmiProvider, createConfig, http } from "wagmi";
Expand All @@ -25,6 +27,8 @@ const connectkitConfig: any = createConfig(
arbitrumSepolia,
scrollSepolia,
lineaSepolia,
baseSepolia,
optimismSepolia,
],
transports: {
[sepolia.id]: http(
Expand All @@ -45,6 +49,12 @@ const connectkitConfig: any = createConfig(
[lineaSepolia.id]: http(
`https://linea-sepolia.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`
),
[baseSepolia.id]: http(
`https://base-sepolia.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`
),
[optimismSepolia.id]: http(
`https://optimism-sepolia.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`
),
},

walletConnectProjectId:
Expand Down

0 comments on commit 7981aa4

Please sign in to comment.