> loading_
# EIP-2780 Transfer Log Cost — Developer Walkthrough
# This walkthrough explores how the transfer log cost mechanism
# might affect your contracts and how to prepare for it.
# -----------------------------------------------------------------
# 1. UNDERSTANDING THE CHANGE: Transfer logs for native ETH
# -----------------------------------------------------------------
# Currently, native ETH transfers do NOT emit EVM logs.
# EIP-2780 proposes that the protocol itself emits a log
# when ETH is transferred, with an associated gas cost.
#
# This means a simple `.call{value: amount}("")` may cost
# slightly more gas than it does today due to the log overhead.
# -----------------------------------------------------------------
# 2. REVIEW YOUR ETH TRANSFER PATTERNS
# -----------------------------------------------------------------
# Audit contracts that send ETH and check gas assumptions.
# // SPDX-License-Identifier: MIT
# pragma solidity ^0.8.24;
#
# contract PaymentSplitter {
# // If EIP-2780 lands, each of these .call transfers
# // will incur an additional transfer log cost.
# // Ensure your gas buffer accounts for this.
#
# function splitPayment(address payable a, address payable b) external payable {
# uint256 half = msg.value / 2;
#
# // Each call below would generate a protocol-level transfer log
# (bool s1,) = a.call{value: half}("");
# require(s1, "Transfer to A failed");
#
# (bool s2,) = b.call{value: half}("");
# require(s2, "Transfer to B failed");
# }
# }
# -----------------------------------------------------------------
# 3. GAS ESTIMATION IMPACT
# -----------------------------------------------------------------
# If you hardcode gas limits for internal ETH transfers,
# the transfer log cost could cause unexpected reverts.
#
# // AVOID: Hardcoded gas stipends that may be too tight
# // a.call{value: amount, gas: 2300}("");
# //
# // PREFER: Let the EVM determine gas or use a generous buffer
# // a.call{value: amount}("");
# -----------------------------------------------------------------
# 4. INDEXER / INFRASTRUCTURE BENEFIT
# -----------------------------------------------------------------
# With protocol-emitted transfer logs, indexers can subscribe
# to native ETH transfers via standard log filters instead of
# relying on debug_traceTransaction or custom tracers.
#
# // Pseudocode for an indexer listening for transfer logs:
# // const filter = {
# // topics: [NATIVE_TRANSFER_LOG_TOPIC] // defined by EIP-2780
# // };
# // provider.on(filter, (log) => {
# // const { from, to, value } = decodeTransferLog(log);
# // updateBalanceIndex(from, to, value);
# // });
# -----------------------------------------------------------------
# 5. TRACK THE EIP
# -----------------------------------------------------------------
# Monitor the EIP-2780 spec and discussion:
# https://github.com/ethereum/EIPs/pull/2780
# Status: Draft — not yet scheduled for any hardfork.
# Action: Review gas assumptions now; no contract changes needed yet.