From 204ee630c207389c82be9857ed46d2a2e5f68c63 Mon Sep 17 00:00:00 2001 From: Vitore7 Date: Sat, 8 Nov 2025 16:03:01 +0300 Subject: [PATCH] Create hello-dapp2.md docs: add hello-dapp example for Base Testnet --- docs/examples/hello-dapp2.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/examples/hello-dapp2.md diff --git a/docs/examples/hello-dapp2.md b/docs/examples/hello-dapp2.md new file mode 100644 index 00000000..86a235e8 --- /dev/null +++ b/docs/examples/hello-dapp2.md @@ -0,0 +1,15 @@ +# Hello DApp Example + +This is a simple example showing how to connect to the **Base Testnet** using `ethers.js`. + +```js +import { ethers } from "ethers"; + +const provider = new ethers.JsonRpcProvider("https://sepolia.base.org"); + +async function main() { + const blockNumber = await provider.getBlockNumber(); + console.log("Current block number on Base Testnet:", blockNumber); +} + +main();