Skip to main content

Ethereum

Ethereum is a decentralized, open-source blockchain with smart contract functionality. Ether (ETH) is the native cryptocurrency of the platform.

The Ethereum network is one of the most popular platforms for building dApps and blockchain solutions. A series of upgrades are currently taking place as part of the transition from Proof-of-Work to a Proof-of-Stake consensus model. This shift allows network participants to stake ETH and earn rewards for supporting the network.

To connect to an Ethereum node, every Ethereum Client e.g. Geth or Erigon implements a JSON-RPC specification. The Ethereum JSON-RPC Specification is a collection of methods that all clients implement.

Ethereum

Docs

Github


Connect wallet

You can set up your MetaMask wallet to connect to Ethereum RPC. You can then perform transactions and interact with the network.

Example request - web3_clientVersion

This request gets the Client version being used.

curl https://username.chainprtcl.net/eth/uid \
-X POST \ -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}'

Example response - Geth Client version

The response shows Geth Client v1.1.7-74 is used.

{"jsonrpc":"2.0","id":67,"result":"erigon/2.38.0/linux-amd64/go1.19.5"}

Example request - Uses eth_ to request the latest block number

curl https://username.chainprtcl.net/eth/uid \
-X POST \ -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":67}'

Example response

The latest block number is returned in hex

{"jsonrpc":"2.0","id":67,"result":"0xff3b18"}