Skip to content

Commit

Permalink
Merge pull request #263 from gemeniteg/master
Browse files Browse the repository at this point in the history
Add Mint chain, Taiko chain for Owlto
  • Loading branch information
vrtnd authored Aug 3, 2024
2 parents e9e0eda + ef4db96 commit b2573d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/adapters/owlto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Chain } from "@defillama/sdk/build/general";
import { EventData } from "../../utils/types";
import { getTxsBlockRangeEtherscan, wait } from "../../helpers/etherscan";
import { getTxsBlockRangeMerlinScan } from "../../helpers/merlin";
import { getTxsBlockRangeBtrScan } from "../../helpers/btr";

const retry = require("async-retry");

Expand Down Expand Up @@ -34,6 +35,7 @@ export const bridgesAddress = {
zklink: ["0x5e809A85Aa182A9921EDD10a4163745bb3e36284"],
op_bnb: ["0x5e809A85Aa182A9921EDD10a4163745bb3e36284"],
"bouncebit-mainnet": ["0x5e809A85Aa182A9921EDD10a4163745bb3e36284"],
mint: ["0x5e809A85Aa182A9921EDD10a4163745bb3e36284"],
} as const;

export const contractsAddress = {
Expand Down Expand Up @@ -62,6 +64,7 @@ export const contractsAddress = {
zklink: ["0xC626845BF4E6a5802Ef774dA0B3DfC6707F015F7"],
op_bnb: ["0xC626845BF4E6a5802Ef774dA0B3DfC6707F015F7"],
"bouncebit-mainnet": ["0xC626845BF4E6a5802Ef774dA0B3DfC6707F015F7"],
mint: ["0xC626845BF4E6a5802Ef774dA0B3DfC6707F015F7"],
} as const;

const nativeTokens: Record<string, string> = {
Expand All @@ -78,6 +81,9 @@ const nativeTokens: Record<string, string> = {
era: "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
arbitrum_nova: "0x722E8BdD2ce80A4422E880164f2079488e115365",
merlin: "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",
taiko: "0xA51894664A773981C6C112C43ce576f315d5b1B6",
btr: "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",
zklink: "0x8280a4e7D5B3B658ec4580d3Bc30f5e50454F169",
};

type SupportedChains = keyof typeof bridgesAddress;
Expand Down Expand Up @@ -105,6 +111,10 @@ const constructParams = (chain: SupportedChains) => {
txs = await getTxsBlockRangeMerlinScan(address, fromBlock, toBlock, {
includeSignatures: ["0x"],
});
} else if (chain === "btr") {
txs = await getTxsBlockRangeBtrScan(address, fromBlock, toBlock, {
includeSignatures: ["0x"],
});
} else {
txs = await getTxsBlockRangeEtherscan(chain, address, fromBlock, toBlock, {
includeSignatures: ["0x"],
Expand Down Expand Up @@ -132,6 +142,10 @@ const constructParams = (chain: SupportedChains) => {
txs = await getTxsBlockRangeMerlinScan(address, fromBlock, toBlock, {
includeSignatures: ["0xfc180638"],
});
} else if (chain === "btr") {
txs = await getTxsBlockRangeBtrScan(address, fromBlock, toBlock, {
includeSignatures: ["0xfc180638"],
});
} else {
txs = await getTxsBlockRangeEtherscan(chain, address, fromBlock, toBlock, {
includeSignatures: ["0xfc180638"],
Expand Down Expand Up @@ -186,6 +200,7 @@ const adapter: BridgeAdapter = {
zklink: constructParams("zklink"),
opbnb: constructParams("op_bnb"),
bouncebit: constructParams("bouncebit-mainnet"),
mint: constructParams("mint"),

'x layer': constructParams("xlayer"),
"arbitrum nova": constructParams("arbitrum_nova"),
Expand Down
1 change: 1 addition & 0 deletions src/data/bridgeNetworkData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,7 @@ export default [
"ZkLink",
"Bouncebit",
"opBNB",
"Mint",

"zkSync Era",
"Polygon zkEVM",
Expand Down

0 comments on commit b2573d7

Please sign in to comment.