inkonchain / inkonchain/docs

[docs] Empty example section in `onchain-clients.mdx` - fill in or remove?

Open
#669 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
36.5k
Forks
481
Avg merge
6h 16m
Merged PRs (30d)
12

Description

Context

src/pages/build/onchain-clients.mdx, lines ~38-40:

### Example: Fetching the Current Block Number

The following code snippet demonstrates how to fetch and print the current
block number from Ink's testnet:

## Viem - Instructions for Connecting to Ink

The section promises a snippet but provides none.

Given the current situation, I have reached two conclusions:

  1. Sections 1 and 3 of the file already contain examples demonstrating how to retrieve the block:
  • Ethers.js, step 3: const blockNumber = await provider.getBlockNumber();
  • Viem, step 3: const blockNumber = await client.getBlockNumber();

This section might therefore be redundant, so I submitted a PR to remove it: #668

  1. If removal is not an acceptable option—even considering the existing examples—I prepared an alternative and added a code block with a working (and tested) example: #667

I opened both PRs so you can pick one - happy to close
the other (or you can close it directly).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/pages/build/onchain-clients.mdx around lines 38-40 and compare the existing Ethers.js and Viem examples in sections 1 and 3. Review PRs #667 and #668 before making changes; the issue is done when maintainers choose whether the redundant section should be removed or completed.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.