Skip to content

docs(services): improve Infura tutorials with MetaMask workflow and signing guidance#2936

Open
rohan911438 wants to merge 1 commit into
MetaMask:mainfrom
rohan911438:fix/1386-infura-tutorials-mm-context
Open

docs(services): improve Infura tutorials with MetaMask workflow and signing guidance#2936
rohan911438 wants to merge 1 commit into
MetaMask:mainfrom
rohan911438:fix/1386-infura-tutorials-mm-context

Conversation

@rohan911438
Copy link
Copy Markdown

@rohan911438 rohan911438 commented May 31, 2026

Description

Fixes #1386

This PR refreshes several Services tutorials to provide clearer MetaMask context, improve workflow guidance, and align tutorial structure with existing MetaMask documentation standards.

What Changed

The following tutorials were updated:

  • use-web3.js.md
  • send-a-transaction-ethers.md
  • send-a-transaction-viem.md
  • deploy-a-contract-using-web3.js.md
  • call-a-contract.md
  • layer-2-networks/send-a-transaction.md

Improvements

Added MetaMask Context

Each tutorial now includes a short section explaining:

  • Why the workflow is relevant for MetaMask developers.
  • The role of MetaMask within the transaction lifecycle.
  • When developers should use MetaMask versus direct RPC interactions.

Clarified Signing and Broadcasting

Added standardized guidance describing:

  • Transaction signing in MetaMask.
  • Transaction broadcasting through Infura endpoints.
  • Wallet responsibilities versus provider responsibilities.
  • Security considerations around private key management.

Improved Security Guidance

Added warnings before private-key-based examples to clarify that:

  • These workflows are intended for local development, testing, or backend automation.
  • Production dapps should request signatures through MetaMask or another wallet provider rather than exporting private keys.

Added Recommended MetaMask Workflows

Introduced a MetaMask-first workflow section that explains how developers can:

  1. Connect a wallet.
  2. Request account access.
  3. Sign transactions through MetaMask.
  4. Broadcast transactions through the connected provider.

Added Network Selection Guidance

Added notes for tutorials using Sepolia, Polygon, and other EVM networks to help developers:

  • Verify the active MetaMask network.
  • Confirm endpoint and network alignment.
  • Ensure sufficient testnet funds are available before executing examples.

Why

Many tutorials focused primarily on Infura-based workflows and private-key-driven examples without clearly explaining how those workflows fit into a typical MetaMask development experience.

These updates provide a clearer mental model for developers by:

  • Explaining wallet and provider responsibilities.
  • Promoting safer signing practices.
  • Improving consistency across Services tutorials.
  • Aligning tutorial content with broader MetaMask documentation patterns.

Testing

  • Verified documentation formatting.
  • Reviewed Markdown structure for consistency.
  • Confirmed updates are content-only and do not affect runtime behavior.

Note

Low Risk
Markdown-only documentation with no runtime or API changes; content improves security messaging for developers.

Overview
Six Infura Services Ethereum/Polygon tutorials gain shared MetaMask-oriented prose: relevance for dapp builders, network/RPC alignment checks, a signing vs broadcasting split (wallet signs locally; Infura RPC only), and a wallet-first flow (eth_requestAccounts, injected provider/signer, user confirmation).

Private-key examples (.env, config.ts) are framed with :::warning blocks as local dev, test, or automation only, with production guidance to use in-browser wallet signing instead of exported keys. Tutorial steps and sample scripts are unchanged; updates are markdown-only.

Reviewed by Cursor Bugbot for commit 69d2aa1. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI review requested due to automatic review settings May 31, 2026 07:04
@rohan911438 rohan911438 requested review from a team as code owners May 31, 2026 07:04
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@rohan911438 is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Infura tutorials to provide more MM context

2 participants