diff --git a/content/tutorials/how-to-deploy-contract/10.index.md b/content/tutorials/how-to-deploy-contract/10.index.md index 7f3ebc3..6578705 100644 --- a/content/tutorials/how-to-deploy-contract/10.index.md +++ b/content/tutorials/how-to-deploy-contract/10.index.md @@ -124,6 +124,7 @@ const config: HardhatUserConfig = { }, }, }; +export default config; ``` In the configuration above we have some important fields such as: diff --git a/content/tutorials/how-to-deposit-erc20/10.index.md b/content/tutorials/how-to-deposit-erc20/10.index.md index a3f5a7e..d430da9 100644 --- a/content/tutorials/how-to-deposit-erc20/10.index.md +++ b/content/tutorials/how-to-deposit-erc20/10.index.md @@ -75,7 +75,7 @@ dotenv.config(); // HTTP RPC endpoints const L1_RPC_ENDPOINT = process.env.L1_RPC_ENDPOINT || ""; // or an RPC endpoint from Infura/Chainstack/QuickNode/etc. -const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://testnet.era.zksync.dev"; // or the zkSync Era mainnet +const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://sepolia.era.zksync.dev"; // or the zkSync Era mainnet // ERC-20 Token (DAI) address in L1 const TOKEN_ADDRESS = "0x5C221E77624690fff6dd741493D735a17716c26B"; diff --git a/content/tutorials/how-to-deposit-eth/10.index.md b/content/tutorials/how-to-deposit-eth/10.index.md index e3ea84c..fb6fd59 100644 --- a/content/tutorials/how-to-deposit-eth/10.index.md +++ b/content/tutorials/how-to-deposit-eth/10.index.md @@ -76,7 +76,7 @@ dotenv.config(); // HTTP RPC endpoints const L1_RPC_ENDPOINT = process.env.L1_RPC_ENDPOINT || ""; // or an RPC endpoint from Infura/Chainstack/QuickNode/etc. -const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://testnet.era.zksync.dev"; // or the zkSync Era mainnet +const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://sepolia.era.zksync.dev"; // or the zkSync Era mainnet // Amount in ETH const AMOUNT = "0.00001"; diff --git a/content/tutorials/how-to-test-contracts/10.index.md b/content/tutorials/how-to-test-contracts/10.index.md index 954b827..d473319 100644 --- a/content/tutorials/how-to-test-contracts/10.index.md +++ b/content/tutorials/how-to-test-contracts/10.index.md @@ -161,7 +161,7 @@ With the previous steps completed, your `hardhat.config.ts` file should now be p ```ts [hardhat.config.ts] import { HardhatUserConfig } from "hardhat/config"; -import "@matterlabs/hardhat-zksync +import "@matterlabs/hardhat-zksync" import "@nomicfoundation/hardhat-chai-matchers"; const config: HardhatUserConfig = { @@ -194,7 +194,6 @@ import { expect } from "chai"; import { Wallet, Provider, Contract } from "zksync-ethers"; import { Deployer } from "@matterlabs/hardhat-zksync"; import { ZkSyncArtifact } from "@matterlabs/hardhat-zksync/src/types"; -import "@matterlabs/hardhat-zksync/dist/type-extensions"; const RICH_PRIVATE_KEY = "0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110"; diff --git a/content/tutorials/how-to-withdraw-erc20/10.index.md b/content/tutorials/how-to-withdraw-erc20/10.index.md index 410543d..ec22279 100644 --- a/content/tutorials/how-to-withdraw-erc20/10.index.md +++ b/content/tutorials/how-to-withdraw-erc20/10.index.md @@ -72,7 +72,7 @@ dotenv.config(); // HTTP RPC endpoints const L1_RPC_ENDPOINT = process.env.L1_RPC_ENDPOINT || ""; // or an RPC endpoint from Infura/Chainstack/QuickNode/etc. -const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://testnet.era.zksync.dev"; // or the zkSync Era mainnet +const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://sepolia.era.zksync.dev"; // or the zkSync Era mainnet // ERC-20 Token address in L2 const TOKEN_ADDRESS = ""; @@ -98,7 +98,7 @@ async function main() { console.log(`Running script to bridge ERC-20 to L1`); // Initialize the wallet. - const l1provider = new ethers.Provider(L1_RPC_ENDPOINT); + const l1provider = new Provider(L1_RPC_ENDPOINT); const l2provider = new Provider(L2_RPC_ENDPOINT); const wallet = new Wallet(WALLET_PRIV_KEY, l2provider, l1provider); @@ -127,7 +127,7 @@ main() Execute the script using the following command: ```sh -npx ts-node withdraw.ts +npx ts-node withdraw-erc20.ts ``` ## Verify the Output diff --git a/content/tutorials/how-to-withdraw-eth/10.index.md b/content/tutorials/how-to-withdraw-eth/10.index.md index a55c490..5fc1e07 100644 --- a/content/tutorials/how-to-withdraw-eth/10.index.md +++ b/content/tutorials/how-to-withdraw-eth/10.index.md @@ -72,7 +72,7 @@ dotenv.config(); // HTTP RPC endpoints const L1_RPC_ENDPOINT = process.env.L1_RPC_ENDPOINT || ""; // or an RPC endpoint from Infura/Chainstack/QuickNode/etc. -const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://testnet.era.zksync.dev"; // or the zkSync Era mainnet +const L2_RPC_ENDPOINT = process.env.L2_RPC_ENDPOINT || "https://sepolia.era.zksync.dev"; // or the zkSync Era mainnet // Wallet const WALLET_PRIV_KEY = process.env.WALLET_PRIV_KEY || ""; @@ -104,7 +104,7 @@ async function main() { const withdrawHandle = await wallet.withdraw({ to: wallet.address, // can bridge to a different address in L1 token: utils.ETH_ADDRESS, - amount: ethers.utils.parseEther(AMOUNT), + amount: ethers.parseEther(AMOUNT), }); console.log(`Withdraw transaction sent ${withdrawHandle.hash}`); } catch (error: any) {