bridge_ui: add acala

This commit is contained in:
Evan Gray 2022-06-03 18:16:11 -04:00 committed by Evan Gray
parent fea56f5679
commit c47aa300b7
8 changed files with 55 additions and 21 deletions

View File

@ -8,7 +8,7 @@
"name": "test_ui",
"version": "0.1.0",
"dependencies": {
"@certusone/wormhole-sdk": "^0.3.4",
"@certusone/wormhole-sdk": "^0.3.7",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
@ -2132,9 +2132,9 @@
}
},
"node_modules/@certusone/wormhole-sdk": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.4.tgz",
"integrity": "sha512-zwBpAI2nOh3zZ7lIZeBiR/MnlJR9HNCpW1INfA82gHJy35EabGzjNzaxDAdGXWVuWYjvdodwbiy7czB8m9Zpxw==",
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.7.tgz",
"integrity": "sha512-C+PqzRITASWJJ9XnGOUnUssGL6yV4B5ivkfHsBLR4WChmSSY8ENnYr92WMj/mH+sw55sQsEAycCjqZEsrIlaAQ==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"@solana/spl-token": "^0.1.8",
@ -46733,9 +46733,9 @@
}
},
"@certusone/wormhole-sdk": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.4.tgz",
"integrity": "sha512-zwBpAI2nOh3zZ7lIZeBiR/MnlJR9HNCpW1INfA82gHJy35EabGzjNzaxDAdGXWVuWYjvdodwbiy7czB8m9Zpxw==",
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.7.tgz",
"integrity": "sha512-C+PqzRITASWJJ9XnGOUnUssGL6yV4B5ivkfHsBLR4WChmSSY8ENnYr92WMj/mH+sw55sQsEAycCjqZEsrIlaAQ==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"@solana/spl-token": "^0.1.8",

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@certusone/wormhole-sdk": "^0.3.4",
"@certusone/wormhole-sdk": "^0.3.7",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",

View File

@ -14,6 +14,7 @@ import {
CHAIN_ID_POLYGON,
CHAIN_ID_SOLANA,
CHAIN_ID_TERRA,
CHAIN_ID_ACALA,
} from "@certusone/wormhole-sdk";
import { Button, makeStyles, Typography } from "@material-ui/core";
import { Transaction } from "../store/transferSlice";
@ -91,6 +92,12 @@ export default function ShowTx({
? "blockscout.karura-dev.aca-dev.network"
: "blockscout.karura.network"
}/tx/${tx?.id}`
: chainId === CHAIN_ID_ACALA
? `https://${
CLUSTER === "testnet"
? "blockscout.acala-dev.aca-dev.network"
: "blockscout.acala.network"
}/tx/${tx?.id}`
: chainId === CHAIN_ID_SOLANA
? `https://solscan.io/tx/${tx?.id}${
CLUSTER === "testnet"

View File

@ -15,6 +15,7 @@ import {
CHAIN_ID_SOLANA,
CHAIN_ID_TERRA,
isNativeDenom,
CHAIN_ID_ACALA,
} from "@certusone/wormhole-sdk";
import { Button, makeStyles, Tooltip, Typography } from "@material-ui/core";
import { FileCopy, OpenInNew } from "@material-ui/icons";
@ -154,6 +155,12 @@ export default function SmartAddress({
? "blockscout.karura-dev.aca-dev.network"
: "blockscout.karura.network"
}/${isAsset ? "token" : "address"}/${useableAddress}`
: chainId === CHAIN_ID_ACALA
? `https://${
CLUSTER === "testnet"
? "blockscout.acala-dev.aca-dev.network"
: "blockscout.acala.network"
}/${isAsset ? "token" : "address"}/${useableAddress}`
: chainId === CHAIN_ID_SOLANA
? `https://solscan.io/address/${useableAddress}${
CLUSTER === "testnet"

View File

@ -15,6 +15,7 @@ import {
CHAIN_ID_POLYGON,
CHAIN_ID_SOLANA,
CHAIN_ID_TERRA,
CONTRACTS,
isEVMChain,
} from "@certusone/wormhole-sdk";
import { clusterApiUrl } from "@solana/web3.js";
@ -50,6 +51,11 @@ export interface ChainInfo {
export const CHAINS: ChainInfo[] =
CLUSTER === "mainnet"
? [
{
id: CHAIN_ID_ACALA,
name: "Acala",
logo: acalaIcon,
},
{
id: CHAIN_ID_AURORA,
name: "Aurora",
@ -217,7 +223,7 @@ export const CHAINS: ChainInfo[] =
},
];
export const BETA_CHAINS: ChainId[] =
CLUSTER === "mainnet" ? [CHAIN_ID_CELO, CHAIN_ID_KLAYTN] : [];
CLUSTER === "mainnet" ? [CHAIN_ID_ACALA, CHAIN_ID_CELO, CHAIN_ID_KLAYTN] : [];
export const CHAINS_WITH_NFT_SUPPORT = CHAINS.filter(
({ id }) =>
id === CHAIN_ID_AVAX ||
@ -440,7 +446,7 @@ export const KARURA_HOST =
: "";
export const ACALA_HOST =
CLUSTER === "mainnet"
? ""
? "https://eth-rpc-acala.aca-api.network/"
: CLUSTER === "testnet"
? "https://acala-dev.aca-dev.network/eth/http"
: "";
@ -614,21 +620,21 @@ export const KARURA_TOKEN_BRIDGE_ADDRESS = getAddress(
);
export const ACALA_BRIDGE_ADDRESS = getAddress(
CLUSTER === "mainnet"
? "0x0000000000000000000000000000000000000000"
? CONTRACTS.MAINNET.acala.core
: CLUSTER === "testnet"
? "0x4377B49d559c0a9466477195C6AdC3D433e265c0"
: "0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"
);
export const ACALA_NFT_BRIDGE_ADDRESS = getAddress(
CLUSTER === "mainnet"
? "0x0000000000000000000000000000000000000000"
? CONTRACTS.MAINNET.acala.nft_bridge
: CLUSTER === "testnet"
? "0x96f1335e0AcAB3cfd9899B30b2374e25a2148a6E"
: "0x26b4afb60d6c903165150c6f0aa14f8016be4aec"
);
export const ACALA_TOKEN_BRIDGE_ADDRESS = getAddress(
CLUSTER === "mainnet"
? "0x0000000000000000000000000000000000000000"
? CONTRACTS.MAINNET.acala.token_bridge
: CLUSTER === "testnet"
? "0xebA00cbe08992EdD08ed7793E07ad6063c807004"
: "0x0290FB167208Af455bB137780163b7B7a9a10C16"

View File

@ -87,6 +87,20 @@ export const METAMASK_CHAIN_PARAMETERS: {
rpcUrls: ["https://acala-dev.aca-dev.network/eth/http"],
blockExplorerUrls: ["https://blockscout.acala-dev.aca-dev.network"],
},
686: {
chainId: "0x2AE",
chainName: "Karura",
nativeCurrency: { name: "Karura Token", symbol: "KAR", decimals: 18 },
rpcUrls: ["https://eth-rpc-karura.aca-api.network"],
blockExplorerUrls: ["https://blockscout.karura.network"],
},
787: {
chainId: "0x313",
chainName: "Acala",
nativeCurrency: { name: "Acala Token", symbol: "ACA", decimals: 18 },
rpcUrls: ["https://eth-rpc-acala.aca-api.network"],
blockExplorerUrls: ["https://blockscout.acala.network"],
},
4002: {
chainId: "0xfa2",
chainName: "Fantom Testnet",

View File

@ -9,7 +9,7 @@
"version": "1.0.0",
"dependencies": {
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
"@certusone/wormhole-sdk": "^0.3.3",
"@certusone/wormhole-sdk": "^0.3.7",
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^1.8.9",
"axios": "^0.24.0",
@ -542,9 +542,9 @@
}
},
"node_modules/@certusone/wormhole-sdk": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.3.tgz",
"integrity": "sha512-huRguXX5RXOYpudeUoSycN7z9PGn9D+qzgG8N5xMayNykaKWWGgA+fzlWrsHadFcUL8Gnp2ynr757nCAxPaMuQ==",
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.7.tgz",
"integrity": "sha512-C+PqzRITASWJJ9XnGOUnUssGL6yV4B5ivkfHsBLR4WChmSSY8ENnYr92WMj/mH+sw55sQsEAycCjqZEsrIlaAQ==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"@solana/spl-token": "^0.1.8",
@ -10950,9 +10950,9 @@
"requires": {}
},
"@certusone/wormhole-sdk": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.3.tgz",
"integrity": "sha512-huRguXX5RXOYpudeUoSycN7z9PGn9D+qzgG8N5xMayNykaKWWGgA+fzlWrsHadFcUL8Gnp2ynr757nCAxPaMuQ==",
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.3.7.tgz",
"integrity": "sha512-C+PqzRITASWJJ9XnGOUnUssGL6yV4B5ivkfHsBLR4WChmSSY8ENnYr92WMj/mH+sw55sQsEAycCjqZEsrIlaAQ==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"@solana/spl-token": "^0.1.8",

View File

@ -3,7 +3,7 @@
"version": "1.0.0",
"dependencies": {
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
"@certusone/wormhole-sdk": "^0.3.3",
"@certusone/wormhole-sdk": "^0.3.7",
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^1.8.9",
"axios": "^0.24.0",