> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metalntwx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Make Your First Transfer

> Fund a testnet account, send *USDZ, and verify execution and finality

Send one `*USDZ` on Metal Testnet and verify its execution and finality. This
path uses a standard Ethereum transaction and the default `*USDZ` gas token,
so no Metal-specific SDK is required.

## What you will do

1. Create an RPC endpoint and verify the connection.
2. Create an encrypted testnet account.
3. Fund it from the faucet.
4. Transfer one `*USDZ`.
5. Verify the receipt, recipient balance, and finalized block.

## Prerequisites

Complete [Connect to Testnet](https://docs.metalntwx.com/start/connect-to-testnet.md) first. You should have:

* Foundry with `cast` available.
* `METAL_RPC_URL` set to your full endpoint URL and verified against chain ID `63825`.

## Step 1: Create a test account

Generate a new account:

```bash theme={null}
cast wallet new
```

Copy the generated private key into Foundry's encrypted local keystore:

```bash theme={null}
cast wallet import metal-quickstart --interactive
```

When prompted, paste the testnet private key and choose a keystore password.
Then derive the address without exposing the key again:

```bash theme={null}
export SENDER_ADDRESS=$(cast wallet address --account metal-quickstart)
echo "$SENDER_ADDRESS"
```

## Step 2: Fund the account

Open the [Metal faucet](https://faucet.metalntwx.com), paste
`$SENDER_ADDRESS`, and request `*USDZ`.

Set the testnet token address and check the funded balance:

```bash theme={null}
export USDZ_ADDRESS=0x000000000000000000000000000000000000B5D5

cast call "$USDZ_ADDRESS" \
  "balanceOf(address)(uint256)" "$SENDER_ADDRESS" \
  --rpc-url "$METAL_RPC_URL"
```

The same `*USDZ` balance funds both the transfer and its gas. Leave enough
balance to cover both.

## Step 3: Choose a recipient

Choose a recipient EVM address different from the sender's. Replace the
placeholder below with the actual address:

```bash theme={null}
export RECIPIENT_ADDRESS=0xYourRecipientAddress
```

The recipient does not need faucet funds because receiving the transfer does
not require submitting a transaction. Read its balance before sending:

```bash theme={null}
cast call "$USDZ_ADDRESS" \
  "balanceOf(address)(uint256)" "$RECIPIENT_ADDRESS" \
  --rpc-url "$METAL_RPC_URL"
```

Record this value to compare with the balance after the transfer.

## Step 4: Send one \*USDZ

Send one `*USDZ` to the recipient:

```bash theme={null}
cast send "$USDZ_ADDRESS" \
  "transfer(address,uint256)" \
  "$RECIPIENT_ADDRESS" \
  1000000000000000000 \
  --account metal-quickstart \
  --gas-limit 120000 \
  --rpc-url "$METAL_RPC_URL"
```

Enter the keystore password when prompted. `cast send` prints the transaction
hash and receipt. Save the hash:

```bash theme={null}
export TX_HASH=0xYourTransactionHash
```

The transaction's native `value` remains `0`. The explicit gas limit provides
a starting budget for a simple transfer. Receive-policy limit tracking and
quarantine can require more gas.

## Step 5: Verify execution

Read the receipt:

```bash theme={null}
cast receipt "$TX_HASH" --rpc-url "$METAL_RPC_URL"
```

Require:

* a successful status (`1 (success)` in `cast` output, or `0x1` in JSON)
* your account as the sender and the `*USDZ` contract as the transaction recipient
* a `blockNumber` and `blockHash`
* a `Transfer` event from the `*USDZ` contract for one `*USDZ` from `$SENDER_ADDRESS` to `$RECIPIENT_ADDRESS`.

Read the sender's and recipient's balances:

```bash theme={null}
cast call "$USDZ_ADDRESS" \
  "balanceOf(address)(uint256)" "$SENDER_ADDRESS" \
  --rpc-url "$METAL_RPC_URL"

cast call "$USDZ_ADDRESS" \
  "balanceOf(address)(uint256)" "$RECIPIENT_ADDRESS" \
  --rpc-url "$METAL_RPC_URL"
```

For a delivered payment, the recipient's balance should have increased by
`1000000000000000000`, which represents one `*USDZ`. The sender paid both that
amount and its transaction fee.

## Step 6: Verify finality

Read the finalized head:

```bash theme={null}
cast rpc consensus_status --rpc-url "$METAL_RPC_URL"
```

The receipt's `blockNumber` must be at or below `finalized.number`. Decode any
hexadecimal block number before comparing the heights.

Fetch the canonical hash at the receipt's block height:

```bash theme={null}
export RECEIPT_BLOCK_NUMBER=$(cast receipt "$TX_HASH" blockNumber --rpc-url "$METAL_RPC_URL")
cast block "$RECEIPT_BLOCK_NUMBER" --field hash --rpc-url "$METAL_RPC_URL"
```

The returned hash must match the receipt's `blockHash`. With successful
execution, the expected transfer event, and these finality checks, the payment
is complete. See [Settlement and Finality](https://docs.metalntwx.com/reference/network-fundamentals/settlement.md) for the
verification rules.

> [!NOTE]
>
> You funded an account, sent one \*USDZ, and verified the transfer's execution
> and finality.

> [card] [Inspect the transfer](https://docs.metalntwx.com/start/explorer.md)
>
> Look up the transaction, accounts, and containing block.

> [card] [Send with the SDK](https://docs.metalntwx.com/build/payments/direct-payment.md)
>
> Build and submit a `0x7f` transfer with a selected gas token.

> [card] [Connect a browser wallet](https://docs.metalntwx.com/build/prepare/connect-a-browser-wallet.md)
>
> Configure an EIP-1193 wallet and viem clients.

> [card] [Deploy a contract](https://docs.metalntwx.com/build/contracts/deploy-an-application-contract.md)
>
> Deploy Solidity with standard tooling or selected-token gas.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.