From 7e3085d4e0ddf682b64c035b84557626896b40a0 Mon Sep 17 00:00:00 2001 From: lalexgap Date: Fri, 20 Oct 2023 10:06:05 -0700 Subject: [PATCH 1/6] Pretty print deployer total --- scripts/deploy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 04afed3..6a3c56c 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..."); From a50c9515fc903039a39436fffa0198643d019e9c Mon Sep 17 00:00:00 2001 From: lalexgap Date: Fri, 20 Oct 2023 10:39:18 -0700 Subject: [PATCH 2/6] more deploy targets --- hardhat.config.ts | 15 +++++++++++++++ src/chains.ts | 29 ++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index bd7d899..0e7cc9e 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -26,6 +26,21 @@ 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] : [], + }, // Used for testing hardhat: { chainId: diff --git a/src/chains.ts b/src/chains.ts index 1ff6091..2019f7f 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -2,7 +2,10 @@ export type ChainName = | "Hardhat A" | "Hardhat B" | "Polygon zkEVM Testnet" - | "scroll"; + | "scroll" + | "goerli" + | "sepolia" + | "mantle"; export interface ChainData { /** @@ -67,4 +70,28 @@ 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", + }, ]; From e7dfd7e9cf1639872319b62654bf6bf58bd2f36a Mon Sep 17 00:00:00 2001 From: lalexgap Date: Fri, 20 Oct 2023 11:33:02 -0700 Subject: [PATCH 3/6] add optimism deploy --- hardhat.config.ts | 5 +++++ src/chains.ts | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 0e7cc9e..cc3a283 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -41,6 +41,11 @@ const config: HardhatUserConfig = { 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] : [], + }, // Used for testing hardhat: { chainId: diff --git a/src/chains.ts b/src/chains.ts index 2019f7f..2564270 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -5,7 +5,8 @@ export type ChainName = | "scroll" | "goerli" | "sepolia" - | "mantle"; + | "mantle" + | "optimism"; export interface ChainData { /** @@ -94,4 +95,12 @@ export const chains: ChainData[] = [ 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, + }, ]; From 32a788ea40d81e655eaacbc49a743e7e41a7ea63 Mon Sep 17 00:00:00 2001 From: lalexgap Date: Fri, 20 Oct 2023 11:39:50 -0700 Subject: [PATCH 4/6] add filecoin --- hardhat.config.ts | 5 +++++ src/chains.ts | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index cc3a283..998a381 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -46,6 +46,11 @@ const config: HardhatUserConfig = { 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/src/chains.ts b/src/chains.ts index 2564270..9594b60 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -6,7 +6,8 @@ export type ChainName = | "goerli" | "sepolia" | "mantle" - | "optimism"; + | "optimism" + | "filecoin"; export interface ChainData { /** @@ -103,4 +104,12 @@ export const chains: ChainData[] = [ 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, + }, ]; From 9e4b8997fb0bc975630b93b15298e00589394aae Mon Sep 17 00:00:00 2001 From: lalexgap Date: Fri, 20 Oct 2023 11:51:15 -0700 Subject: [PATCH 5/6] wait for deployments together --- scripts/deploy.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 6a3c56c..da1e07f 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -22,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( @@ -45,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( [ From 0bde6ea96f4dfa411004e464c4d3f818d8509f4e Mon Sep 17 00:00:00 2001 From: lalexgap Date: Sat, 21 Oct 2023 12:23:18 -0700 Subject: [PATCH 6/6] add logo --- src/ChainLogo.tsx | 7 +++++++ src/assets/filecoin-logo.svg | 27 ++++++++++++++++++++++++++ src/assets/mantle-logo.svg | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/assets/filecoin-logo.svg create mode 100644 src/assets/mantle-logo.svg 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 @@ + + + + + + + +