Skip to content

Commit

Permalink
add tBTC support on Base Goerli
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo committed Aug 2, 2023
1 parent 6665e38 commit 58eff52
Showing 1 changed file with 32 additions and 30 deletions.
62 changes: 32 additions & 30 deletions src/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,39 +408,41 @@ export const CHAINS_BY_ID: ChainsById = CHAINS.reduce((obj, chain) => {
return obj;
}, {} as ChainsById);

const THRESHOLD_GATEWAYS_MAINNET: any = {
[CHAIN_ID_POLYGON]: "0x09959798B95d00a3183d20FaC298E4594E599eab",
[CHAIN_ID_OPTIMISM]: "0x1293a54e160D1cd7075487898d65266081A15458",
[CHAIN_ID_ARBITRUM]: "0x1293a54e160D1cd7075487898d65266081A15458",
} as const;

const THRESHOLD_GATEWAYS_TESTNET: any = {
[CHAIN_ID_POLYGON]: "0x91fe7128f74dbd4f031ea3d90fc5ea4dcfd81818",
[CHAIN_ID_OPTIMISM]: "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621",
[CHAIN_ID_ARBITRUM]: "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2",
[CHAIN_ID_BASE]: "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343",
} as const;

export const THRESHOLD_GATEWAYS: any = {
[CHAIN_ID_POLYGON]:
CLUSTER === "mainnet"
? "0x09959798B95d00a3183d20FaC298E4594E599eab"
: "0x91fe7128f74dbd4f031ea3d90fc5ea4dcfd81818",
[CHAIN_ID_OPTIMISM]:
CLUSTER === "mainnet"
? "0x1293a54e160D1cd7075487898d65266081A15458"
: "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621",
[CHAIN_ID_ARBITRUM]:
CLUSTER === "mainnet"
? "0x1293a54e160D1cd7075487898d65266081A15458"
: "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2",
};
...(CLUSTER === "mainnet" ? THRESHOLD_GATEWAYS_MAINNET : THRESHOLD_GATEWAYS_TESTNET),
} as const;

const THRESHOLD_TBTC_CONTRACTS_MAINNET: any = {
[CHAIN_ID_ETH]: "0x18084fbA666a33d37592fA2633fD49a74DD93a88",
[CHAIN_ID_POLYGON]: "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b",
[CHAIN_ID_OPTIMISM]: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40",
[CHAIN_ID_ARBITRUM]: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40",
} as const

const THRESHOLD_TBTC_CONTRACTS_TESTNET: any = {
[CHAIN_ID_ETH]: "0x679874fBE6D4E7Cc54A59e315FF1eB266686a937",
[CHAIN_ID_POLYGON]: "0xBcD7917282E529BAA6f232DdDc75F3901245A492",
[CHAIN_ID_OPTIMISM]: "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d",
[CHAIN_ID_ARBITRUM]: "0x85727F4725A4B2834e00Db1AA8e1b843a188162F",
[CHAIN_ID_BASE]: "0x783349cd20f26CE12e747b1a17bC38D252c9e119",
} as const

export const THRESHOLD_TBTC_CONTRACTS: any = {
[CHAIN_ID_ETH]:
CLUSTER === "mainnet"
? "0x18084fbA666a33d37592fA2633fD49a74DD93a88"
: "0x679874fBE6D4E7Cc54A59e315FF1eB266686a937",
[CHAIN_ID_POLYGON]:
CLUSTER === "mainnet"
? "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b"
: "0xBcD7917282E529BAA6f232DdDc75F3901245A492",
[CHAIN_ID_OPTIMISM]:
CLUSTER === "mainnet"
? "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"
: "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d",
[CHAIN_ID_ARBITRUM]:
CLUSTER === "mainnet"
? "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40"
: "0x85727F4725A4B2834e00Db1AA8e1b843a188162F",
};
...(CLUSTER === "mainnet" ? THRESHOLD_TBTC_CONTRACTS_MAINNET : THRESHOLD_TBTC_CONTRACTS_TESTNET),
} as const;

// prettier-ignore
export const TBTC_ASSET_ADDRESS = THRESHOLD_TBTC_CONTRACTS[CHAIN_ID_ETH].slice(2).padStart(64, "0");
Expand Down

0 comments on commit 58eff52

Please sign in to comment.