In this track: Write and read Solidity
advanced · 4 MIN READ

Addresses and payable addresses

An address representation and permission to use value-transfer syntax are different concepts.

LET’S PICTURE IT

Writing a destination on a form does not prove the recipient can accept every delivery method.

SEE IT FOR YOURSELF
From a public address to a verified signatureStep 1 / 4
From a public address to a verified signaturePublic address0x0000…0001Share to receiveAnother personCan read the addressCannot sign for youPublic identifier ≠ secret authorizationLocal signerPrivate key stays hereSign the chosen requestSigned requestMessage + signatureSecret key not includedThe moving packet represents a signature, not a keySignatureCheck the exact messageCheck the signing contextVerificationAuthorization checkedIntent still mattersValidity and safety are different questionsWallet interfaceReads public dataRequests authorizationNetwork stateBalances and recordsIndependent verificationNo wallet is connected in this local illustration

An address is public receiving information. It is not the private key that authorizes actions.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

An address holds a location value

Solidity address represents a 20-byte Ethereum address. It can identify code or another account context on the intended network. It is not a real-world identity certificate.

Payable is a language distinction

address payable supports relevant native-value transfer operations in Solidity. Explicit conversions and the destination’s behavior still matter; a type annotation does not guarantee every payment succeeds.

Contract recipients can execute code

Receiving value may invoke code under the applicable call path. Failure, reentrancy and gas behavior require careful handling in production designs. A checksum does not analyze those properties.

Keep this example read-only

The sample returns the immediate caller’s address. It illustrates identity context without sending assets. Continue to call-frame lessons before writing payment logic.

Read the example

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract LearningExample {
    function caller() external view returns (address) {
        return msg.sender;
    }
}

msg.sender identifies the immediate caller in this ordinary function context.

QUICK CHECK · NO PRESSURE

Does a payable address type prove a destination is trustworthy?

Your progress stays in this browser.
Keep exploring the original referenceSolidity documentation ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.