diff --git a/hardhat.config.ts b/hardhat.config.ts index bd7d899..998a381 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -26,6 +26,31 @@ const config: HardhatUserConfig = { accounts: process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], }, + goerli: { + url: "https://goerli.blockpi.network/v1/rpc/public", + accounts: + process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], + }, + sepolia: { + url: "https://eth-sepolia.public.blastapi.io", + accounts: + process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], + }, + mantle: { + url: "https://rpc.testnet.mantle.xyz", + accounts: + process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], + }, + optimism: { + url: "https://optimism-goerli.public.blastapi.io", + accounts: + process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], + }, + filecoin: { + url: "https://api.calibration.node.glif.io/rpc/v1", + accounts: + process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [], + }, // Used for testing hardhat: { chainId: diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 04afed3..da1e07f 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -10,7 +10,9 @@ const deployFunc = async function (): Promise { hardhatFundedAccount.address, ); console.log( - `Deployer (${hardhatFundedAccount.address}) starting balance ${startingBalance}`, + `Deployer (${ + hardhatFundedAccount.address + }) starting balance ${ethers.formatEther(startingBalance)} ETH`, ); console.log("Starting deployment..."); @@ -20,22 +22,20 @@ const deployFunc = async function (): Promise { const entryPointDeployer = await ethers.getContractFactory("EntryPoint"); const entrypoint = await entryPointDeployer.deploy(); - await entrypoint.waitForDeployment(); const walletDeployer = await ethers.getContractFactory("SCBridgeWallet"); - console.log("EntryPoint deployed to:", await entrypoint.getAddress()); + console.log("EntryPoint deploying to:", await entrypoint.getAddress()); const aliceWallet = await walletDeployer.deploy( aliceAddress, ireneAddress, await entrypoint.getAddress(), ); - await aliceWallet.waitForDeployment(); console.log( `Alice (${aliceAddress?.slice( 0, 12, - )}) SCBridgeWallet deployed to: ${await aliceWallet.getAddress()}`, + )}) SCBridgeWallet deploying to: ${await aliceWallet.getAddress()}`, ); const bobWallet = await walletDeployer.deploy( @@ -43,15 +43,21 @@ const deployFunc = async function (): Promise { ireneAddress, await entrypoint.getAddress(), ); - await bobWallet.waitForDeployment(); console.log( `Bob (${bobAddress?.slice( 0, 12, - )}) SCBridgeWallet deployed to: ${await bobWallet.getAddress()}`, + )}) SCBridgeWallet deploying to: ${await bobWallet.getAddress()}`, ); + await Promise.all([ + bobWallet.waitForDeployment(), + aliceWallet.waitForDeployment(), + entrypoint.waitForDeployment(), + ]); + + console.log("All contracts deployed"); const initialFunding = BigInt(process.env.VITE_SCW_DEPOSIT ?? ""); await fund( [ diff --git a/src/ChainLogo.tsx b/src/ChainLogo.tsx index 5a62b89..b2ea36d 100644 --- a/src/ChainLogo.tsx +++ b/src/ChainLogo.tsx @@ -1,6 +1,9 @@ import React from "react"; import ScrollLogo from "./assets/scroll-logo.svg"; import PolygonLogo from "./assets/polygon-logo.svg"; +import MantleLogo from "./assets/mantle-logo.svg"; +import FilecoinLogo from "./assets/filecoin-logo.svg"; + import { type ChainName } from "./chains"; export const ChainLogo: React.FunctionComponent<{ @@ -14,5 +17,9 @@ export const ChainLogo: React.FunctionComponent<{ return ; case "scroll": return ; + case "filecoin": + return ; + case "mantle": + return ; } }; diff --git a/src/assets/filecoin-logo.svg b/src/assets/filecoin-logo.svg new file mode 100644 index 0000000..dbe53d5 --- /dev/null +++ b/src/assets/filecoin-logo.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/mantle-logo.svg b/src/assets/mantle-logo.svg new file mode 100644 index 0000000..36203f0 --- /dev/null +++ b/src/assets/mantle-logo.svg @@ -0,0 +1,37 @@ + + + + + + + + diff --git a/src/chains.ts b/src/chains.ts index 1ff6091..9594b60 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -2,7 +2,12 @@ export type ChainName = | "Hardhat A" | "Hardhat B" | "Polygon zkEVM Testnet" - | "scroll"; + | "scroll" + | "goerli" + | "sepolia" + | "mantle" + | "optimism" + | "filecoin"; export interface ChainData { /** @@ -67,4 +72,44 @@ export const chains: ChainData[] = [ explorer: "https://sepolia.scrollscan.com/address/", exchangeRate: 1, }, + { + chainID: 5n, + symbol: "ETH", + name: "goerli", + explorer: "https://goerli.etherscan.io", + exchangeRate: 1, + url: "https://goerli.blockpi.network/v1/rpc/public", + }, + { + chainID: 11155111n, + symbol: "ETH", + name: "sepolia", + explorer: "https://sepolia.etherscan.io", + exchangeRate: 1, + url: "https://eth-sepolia.public.blastapi.io", + }, + { + chainID: 5001n, + symbol: "MNT", + name: "mantle", + explorer: "https://explorer.testnet.mantle.xyz", + exchangeRate: 1, + url: "https://rpc.testnet.mantle.xyz", + }, + { + chainID: 420n, + symbol: "ETH", + name: "optimism", + url: "https://optimism-goerli.public.blastapi.io", + explorer: "https://goerli-optimism.etherscan.io", + exchangeRate: 1, + }, + { + chainID: 314159n, + symbol: "TFIL", + name: "filecoin", + url: "https://filecoin-calibration.chainup.net/rpc/v1", + explorer: "https://calibration.filfox.info/en", + exchangeRate: 1, + }, ];