Sub topic 9
Sending a Native Coin Step by Step
Assume you know what a blockchain is and can use a wallet application. You should also understand that a wallet controls keys, while an address identifies where funds can be sent. The steps below use an Ethereum-compatible network, but the same workflow applies to many account-based blockchains.
A native coin is the asset built into a network. Ether is native to Ethereum, and the network's native coin may have another name on another chain. A native transfer changes the balance of the recipient account directly. It does not call a token contract.
Before you send
Check these values before confirming a transfer:
| Value | What to check |
|---|---|
| Network | Sender and recipient use the same supported chain |
| Recipient | Address is copied correctly and belongs to the intended person |
| Amount | Amount is denominated in the native coin |
| Fee | Sender has extra native coin to pay the transaction fee |
| Account | The selected wallet account is the intended sender |
An address is usually a long hexadecimal string. On Ethereum-compatible networks, it commonly begins with 0x and contains 40 hexadecimal characters. The address does not identify the network by itself. The same-looking address can exist on several networks, but its balances are separate.
A transaction fee pays validators or block producers for processing the transaction. The fee is normally calculated from the gas used and the gas price. Gas measures the computational work required. A simple native transfer usually uses less gas than a contract call, but the final fee still depends on network conditions.
The wallet workflow
- Select the correct network in the wallet.
- Select the account that owns the funds.
- Paste the recipient address. Do not type it manually.
- Enter the amount and inspect the fee estimate.
- Confirm that the total cost is within the sender's balance.
- Review the first and last characters of the address using a trusted communication channel.
- Confirm the transaction.
- Save the transaction hash, which is its public identifier.
- Wait for the transaction to enter a block.
The wallet signs the transaction with the account's private key. The private key stays under the wallet's control. The signed transaction is then sent to a node through a remote procedure call (RPC) endpoint.
sequenceDiagram
participant W as Wallet
participant N as Network node
participant V as Validator
participant R as Recipient account
W->>W: Build and sign transaction
W->>N: Broadcast signed transaction
N->>V: Relay transaction
V->>V: Check signature, nonce, balance, and fee
V->>R: Apply balance change
V-->>N: Include transaction in a block
N-->>W: Return receipt and statusA transaction also has a nonce. The nonce is the sender account's sequence number. It prevents replaying an old transaction and determines the order of transactions from that account. If a lower-nonce transaction remains pending, a later transaction may wait behind it.
Sending in code
The following JavaScript example uses ethers version 6. Use a testnet RPC endpoint and a throwaway key while learning. Replace the recipient address with one you control or have verified.
import { JsonRpcProvider, Wallet, parseEther } from "ethers";
const provider = new JsonRpcProvider(process.env.RPC_URL);
const wallet = new Wallet(process.env.PRIVATE_KEY, provider);
const tx = await wallet.sendTransaction({
to: "0x1111111111111111111111111111111111111111",
value: parseEther("0.01"),
});
console.log("Submitted:", tx.hash);
const receipt = await tx.wait();
console.log("Status:", receipt.status === 1 ? "success" : "failed");parseEther converts the human-readable amount into the smallest unit used by the network. Never construct that conversion by floating-point arithmetic. After wait() returns, inspect the receipt. A successful submission is not the same as a confirmed transfer.
Exercise
Your wallet shows a balance of 0.0105 native coins, and the transfer amount is 0.0100. The estimated fee is 0.0008. Should you confirm the transfer?
Show answer
No. The total is 0.0108, which exceeds the available balance. Reduce the amount or add funds for the fee.