Skip to content

Commit

Permalink
Add new chains to eywa
Browse files Browse the repository at this point in the history
  • Loading branch information
spiehdid committed Oct 1, 2024
1 parent 364cde5 commit d9ead86
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 42 deletions.
53 changes: 12 additions & 41 deletions src/adapters/eywa/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,13 @@ enum Chains {
ethereum = "ethereum",
optimism = "optimism",
base = "base",
gnosis = "xdai"
gnosis = "xdai",
blast = "blast",
linea = "linea",
mantle = "mantle",
taiko = "taiko",
}

const contractAddresses = {
[Chains.arbitrum]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.bsc]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.polygon]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.avax]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.fantom]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.ethereum]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.optimism]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.base]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
[Chains.gnosis]: {
portal: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe",
synthesis: "0xf370D9Ed0141207e81321158393Eea5D8a50CC72",
},
};

const depositPortalEventParams: ContractEventParams = {
target: "",
topic: "Locked(address,uint256,address,address)",
Expand Down Expand Up @@ -136,7 +101,9 @@ const mintSynthesisEventParams: ContractEventParams = {
};

const constructParams = (chain: Chains) => {
const { portal, synthesis } = contractAddresses[chain];
const portal = "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe";
const synthesis = "0xf370D9Ed0141207e81321158393Eea5D8a50CC72";

const eventParams: ContractEventParams[] = [
{
...depositPortalEventParams,
Expand Down Expand Up @@ -179,6 +146,10 @@ const adapter: BridgeAdapter = {
avalanche: constructParams(Chains.avax),
[Chains.base]: constructParams(Chains.base),
[Chains.gnosis]: constructParams(Chains.gnosis),
[Chains.blast]: constructParams(Chains.blast),
[Chains.linea]: constructParams(Chains.linea),
[Chains.mantle]: constructParams(Chains.mantle),
[Chains.taiko]: constructParams(Chains.taiko),
};

export default adapter;
16 changes: 15 additions & 1 deletion src/data/bridgeNetworkData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,21 @@ export default [
iconLink: "icons:eywa",
largeTxThreshold: 10000,
url: "https://crosscurve.fi/",
chains: ["Ethereum", "Polygon", "Fantom", "Avalanche", "Arbitrum", "Optimism", "BSC", "Base", "Gnosis"],
chains: [
"Ethereum",
"Polygon",
"Fantom",
"Avalanche",
"Arbitrum",
"Optimism",
"BSC",
"Base",
"Gnosis",
"Blast",
"Linea",
"Mantle",
"Taiko",
],
chainMapping: {
avalanche: "avax",
gnosis: "xdai",
Expand Down

0 comments on commit d9ead86

Please sign in to comment.