Skip to content

Commit

Permalink
Merge pull request #90 from Defi-Moses/working-tree
Browse files Browse the repository at this point in the history
Adding new Synapse CCTP contracts
  • Loading branch information
vrtnd authored Dec 13, 2023
2 parents 8119016 + 2923d0b commit 7558e3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
1 change: 1 addition & 0 deletions src/adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import pepeteam_bridge from './pepeteam-bridge';
import pnetwork from './pnetwork';
import interport from './interport-finance';


export default {
polygon,
synapse,
Expand Down
32 changes: 10 additions & 22 deletions src/adapters/synapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { getTxDataFromEVMEventLogs } from "../../helpers/processTransactions";
const contractAddresses = {
arbitrum: {
synapseBridge: "0x6F4e8eBa4D337f874Ab57478AcC2Cb5BACdc19c9",
synapseCCTP: "0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E",
},
aurora: {
synapseBridge: "0xaeD5b25BE1c3163c907a471082640450F928DDFE",
},
avax: {
synapseBridge: "0xC05e61d0E7a63D27546389B7aD62FdFf5A91aACE",
synapseCCTP: "0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E"
},
boba: {
synapseBridge: "0x432036208d2717394d2614d6697c46DF3Ed69540",
Expand All @@ -36,7 +36,7 @@ const contractAddresses = {
},
ethereum: {
synapseBridge: "0x2796317b0fF8538F253012862c06787Adfb8cEb6",
synapseCCTP: "0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E",
},
fantom: {
synapseBridge: "0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b",
Expand All @@ -52,10 +52,11 @@ const contractAddresses = {
},
optimism: {
synapseBridge: "0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b",
synapseCCTP: "0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E",
},
polygon: {
synapseBridge: "0x8F5BBB2BB8c2Ee94639E55d5F41de9b4839C1280",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E",
},
metis: {
synapseBridge: "0x06Fea8513FF03a0d3f61324da709D4cf06F42A5c",
Expand All @@ -65,7 +66,7 @@ const contractAddresses = {
},
base: {
synapseBridge: "0xf07d1C752fAb503E47FEF309bf14fbDD3E867089",
synapseCCTP:"0xfb2bfc368a7edfd51aa2cbec513ad50edea74e84",
synapseCCTP: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E"
}
} as {
[chain: string]: {
Expand Down Expand Up @@ -360,8 +361,6 @@ const constructParams = (chain:string) => {
target: synapseCCTP || synapseBridge
}



const eventParams = [
finalTokenDepositDepositParams,
finalTokenDepositAndSwapDepositParams,
Expand All @@ -377,46 +376,35 @@ const constructParams = (chain:string) => {
finalCircleRequestFulfilledParams,
]


return async (fromBlock: number, toBlock: number) =>
getTxDataFromEVMEventLogs("synapse", chain, fromBlock, toBlock, eventParams);
getTxDataFromEVMEventLogs("synapse", chain as Chain, fromBlock, toBlock, eventParams);

}



const adapter: BridgeAdapter = {
arbitrum: constructParams("arbitrum"),
aurora: constructParams("aurora"),
avalanche: constructParams("avax"),
bsc: constructParams("bsc"),
ethereum: constructParams("ethereum"),
fantom: constructParams("fantom"),
harmony: constructParams("harmony"),
// harmony: constructParams("harmony"),
moonriver: constructParams("moonriver"),
moonbeam: constructParams("moonbeam"),
optimism: constructParams("optimism"),
polygon: constructParams("polygon"),
klaytn: constructParams("klaytn"),
// // klaytn: constructParams("klaytn"),
base: constructParams("base"),
metis: constructParams("metis"),
// dfk: constructParams("dfk"),
// boba: constructParams("boba"),
// canto: constructParams("canto"),
// // canto: constructParams("canto"),
// cronos: constructParams("cronos"),
// dogechain: constructParams("dogechain"),

};


export default adapter;






// Example contracts:
// Using bridge Zap contract : https://polygonscan.com/tx/0x2cec1d015aef431b5363e7e68afc3c7bd9eecb17a7ea997dc7b5067ecb2167dc
// Using Router Contract: https://polygonscan.com/tx/0xf94193d101fdc9240aafd6069b3e02397a8bc5aff3c2e2f08b969689c7d9f290
// Using regular Bridge Contract: https://polygonscan.com/tx/0x3ffe45b68bb42661b0081b76fc04699ca76944e3113f1c10a397ec0fc5e16f2b
4 changes: 2 additions & 2 deletions src/data/bridgeNetworkData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ export default [
"Arbitrum",
"Optimism",
"Aurora",
"Klaytn",
// "Klaytn",
"BSC",
"Metis",
"Moonbeam",
"Moonriver",
"Base",
"Harmony",
// "Harmony",
// "Dogechain",
// "DFK Chain",
// "Cronos",
Expand Down

0 comments on commit 7558e3f

Please sign in to comment.