Skip to content

Commit

Permalink
include attest
Browse files Browse the repository at this point in the history
  • Loading branch information
yuli-ferna committed Feb 19, 2025
1 parent 7ec1387 commit d46e61e
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Attest/Source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
selectAttestSourceAsset,
selectAttestSourceChain,
} from "../../store/selectors";
import { CHAINS } from "../../utils/consts";
import { ATTEST_CHAINS_SOURCE } from "../../utils/consts";
import ButtonWithLoader from "../ButtonWithLoader";
import ChainSelect from "../ChainSelect";
import KeyAndBalance from "../KeyAndBalance";
Expand Down Expand Up @@ -55,7 +55,7 @@ function Source() {
value={sourceChain}
onChange={handleSourceChange}
disabled={shouldLockFields}
chains={CHAINS}
chains={ATTEST_CHAINS_SOURCE}
/>
<KeyAndBalance chainId={sourceChain} />
<TextField
Expand Down
7 changes: 7 additions & 0 deletions src/components/ShowTx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
CHAIN_ID_SCROLL,
CHAIN_ID_MANTLE,
CHAIN_ID_XLAYER,
CHAIN_ID_BERACHAIN,
} from "@certusone/wormhole-sdk";
import { CHAIN_ID_NEAR } from "@certusone/wormhole-sdk/lib/esm";
import { Button, makeStyles, Typography } from "@material-ui/core";
Expand Down Expand Up @@ -195,6 +196,12 @@ export default function ShowTx({
? "worldchain-sepolia.explorer.alchemy.com"
: "worldscan.org"
}/tx/${tx?.id}`
: chainId === CHAIN_ID_BERACHAIN
? `https://${
CLUSTER === "testnet"
? "bartio.beratrail.io"
: "berascan.com"
}/tx/${tx?.id}`
: chainId === CHAIN_ID_SCROLL
? `https://${
CLUSTER === "testnet" ? "sepolia.scrollscan.dev" : "scrollscan.com"
Expand Down
7 changes: 7 additions & 0 deletions src/components/SmartAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
CHAIN_ID_SCROLL,
CHAIN_ID_MANTLE,
CHAIN_ID_XLAYER,
CHAIN_ID_BERACHAIN,
} from "@certusone/wormhole-sdk";
import { Button, makeStyles, Tooltip, Typography } from "@material-ui/core";
import { FileCopy, OpenInNew } from "@material-ui/icons";
Expand Down Expand Up @@ -216,6 +217,12 @@ export default function SmartAddress({
? "worldchain-sepolia.explorer.alchemy.com"
: "worldscan.org"
}/${isAsset ? "token" : "address"}/${useableAddress}`
: chainId === CHAIN_ID_BERACHAIN
? `https://${
CLUSTER === "testnet"
? "bartio.beratrail.io"
: "berascan.com"
}/${isAsset ? "token" : "address"}/${useableAddress}`
: chainId === CHAIN_ID_SCROLL
? `https://${
CLUSTER === "testnet" ? "sepolia.scrollscan.dev" : "scrollscan.com"
Expand Down
10 changes: 10 additions & 0 deletions src/components/UnwrapNative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
CHAIN_ID_SCROLL,
CHAIN_ID_XLAYER,
CHAIN_ID_MANTLE,
CHAIN_ID_BERACHAIN,
} from "@certusone/wormhole-sdk";
import {
Container,
Expand Down Expand Up @@ -43,6 +44,7 @@ import oasisIcon from "../icons/oasis-network-rose-logo.svg";
import polygonIcon from "../icons/polygon.svg";
import worldchainIcon from "../icons/worldchain.svg";
import scrollIcon from "../icons/scroll.svg";
import berachainIcon from "../icons/berachain.svg";
import { COLORS } from "../muiTheme";
import {
DataWrapper,
Expand Down Expand Up @@ -82,6 +84,8 @@ import {
WMNT_DECIMALS,
WOKB_ADDRESS,
WOKB_DECIMALS,
BERAWETH_ADDRESS,
BERAWETH_DECIMALS,
} from "../utils/consts";
import parseError from "../utils/parseError";
import ButtonWithLoader from "./ButtonWithLoader";
Expand Down Expand Up @@ -195,6 +199,12 @@ const supportedTokens = {
address: WORLDWETH_ADDRESS,
decimals: WORLDWETH_DECIMALS,
},
[CHAIN_ID_BERACHAIN]: {
symbol: "WETH",
icon: berachainIcon,
address: BERAWETH_ADDRESS,
decimals: BERAWETH_DECIMALS,
},
[CHAIN_ID_SCROLL]: {
symbol: "WETH",
icon: scrollIcon,
Expand Down
Binary file removed src/icons/berachain.png
Binary file not shown.
12 changes: 12 additions & 0 deletions src/icons/berachain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions src/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import terra2Icon from "../icons/terra2.svg";
import nearIcon from "../icons/near.svg";
import xplaIcon from "../icons/xpla.svg";
import evmosIcon from "../icons/evmos.svg";
import berachainIcon from "../icons/berachain.png";
import berachainIcon from "../icons/berachain.svg";
import osmosIcon from "../icons/osmos.svg";
import kujiraIcon from "../icons/kujira.svg";
import injectiveIcon from "../icons/injective.svg";
Expand Down Expand Up @@ -549,8 +549,9 @@ export const NEW_CHAINS: ChainInfo[] = [
},
];

export const ATTEST_CHAINS: ChainInfo[] = CHAINS.concat(COSMOS_CHAINS);
export const TOKEN_ORIGIN_VERIFIER_CHAINS: ChainInfo[] = CHAINS.concat(NEW_CHAINS)
export const ATTEST_CHAINS_SOURCE: ChainInfo[] = CHAINS.concat(NEW_CHAINS);
export const ATTEST_CHAINS: ChainInfo[] = CHAINS.concat(COSMOS_CHAINS).concat(NEW_CHAINS);
export const TOKEN_ORIGIN_VERIFIER_CHAINS: ChainInfo[] = CHAINS.concat(NEW_CHAINS);
export const BETA_CHAINS: ChainId[] = CLUSTER === "mainnet" ? [] : [];
export const CHAINS_WITH_NFT_SUPPORT = CHAINS.filter(
({ id }) =>
Expand Down Expand Up @@ -1735,6 +1736,14 @@ export const WORLDWETH_ADDRESS =
: "0xDDb64fE46a91D46ee29420539FC25FD07c5FEa3E";
export const WORLDWETH_DECIMALS = 18;

export const BERAWETH_ADDRESS =
CLUSTER === "mainnet"
? "0x6969696969696969696969696969696969696969"
: CLUSTER === "testnet"
? "0x6969696969696969696969696969696969696969"
: "0xDDb64fE46a91D46ee29420539FC25FD07c5FEa3E";
export const BERAWETH_DECIMALS = 18;

export const SCROLLWETH_ADDRESS =
CLUSTER === "mainnet"
? "0x5300000000000000000000000000000000000004"
Expand Down

0 comments on commit d46e61e

Please sign in to comment.