Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article explores ERC7946, a proposed protocol that allows users to execute batch transactions using only a QR code or NFC, without connecting their wallet.

This article explains the proposal linked below.

The protocol lets a dApp send multiple contract calls to a wallet as a single atomic transaction without first learning the user's address.

Overview

ERC7946 specifies a protocol called Universal Wallet Uplink (UWULink).

Through one-way communication from a dApp to a wallet, multiple contract calls can be executed as a single atomic batch transaction. It uses a compact binary message format based on Protocol Buffers, suitable for low-bandwidth channels such as QR codes and NFC tags.

Two modes are available: Static Mode, which embeds the list of calls directly, and Programmable Mode, which references an on-chain Resolver contract to generate the list dynamically.

The original diagrams and Mermaid labels are retained in Japanese.

UWULink protocol overview

For more about EIP7702, see the following article.

[EIP7702] How EOAs can act as contract accounts

For more about EIP5792, see the following article.

[EIP5792] JSON-RPC methods for executing batch transactions

Motivation

dApps often require multistep operations, such as approving a token and then swapping it. Traditionally, users had to confirm each step and connect their wallet first. EIP5792 and EIP7702 made batch execution possible, but the bidirectional connection between the dApp and the wallet still introduces UX friction and privacy concerns.

Atomic multicall

With EIP7702, externally owned accounts (EOAs) can execute batch transactions much like smart contract wallets. Token approval, swaps, and transfers can be handled with a single confirmation, eliminating the risk of partial execution.

Privacy protection

In current wallet connection flows (EIP1193 / EIP1102), the user's address is disclosed to the dApp before a transaction is submitted. Because UWULink is one-way, the dApp does not receive the user's address or wallet information through the protocol. The address becomes public only when the transaction is broadcast to the blockchain.

Offline and one-way communication

Sometimes a transaction request must be conveyed without establishing a session, such as when scanning a QR code on a desktop screen with a mobile device, tapping an NFC tag at a store, or scanning a printed QR code. Session-based protocols such as WalletConnect are unnecessarily heavy for these one-off interactions. With UWULink, users can complete an on-chain action by scanning a QR code.

Compact encoding

QR codes and NFC have limited data capacity. URI formats such as EIP681 become larger when addresses and calldata are hex-encoded. UWULink uses binary serialization with Protocol Buffers (Protobuf), allowing the same information to be represented in a much smaller payload.

For more about EIP681, see the following article.

[EIP2681] A proposal to limit the nonce range of Ethereum accounts

Programmability

When the list of calls depends on on-chain state or user-specific data (for example, a list of airdrops a particular user can claim), encoding all the data statically is impractical. With Programmable Mode, a dApp needs to include only the Resolver contract address and input data in the payload. This keeps the QR/NFC payload small while accommodating complex logic.

Specification

Protocol overview

UWULink has the following properties.

Property Details
One-way communication dApp → wallet only, with no data returned from the wallet to the dApp
Atomic execution Either all calls in the batch succeed, or all revert
No authentication required The wallet does not authenticate itself to the dApp or disclose its address in advance
Binary encoding Serialized using Protocol Buffers and converted to a URI using URL-safe Base64
Chain ID specification The message includes a chain ID to identify the target chain

The URI consists of the uwulink: scheme followed by the Base64-encoded message.

text
uwulink:<base64_of_UWULink_message>

Protobuf schema

UWULink messages are defined using the following Protobuf schema.

protobuf
syntax = "proto3";
package org.ethereum.uwulink;

message UWULinkRequest {
  uint64 chain_id = 1;
  oneof request_type {
    Batch batch = 2;
    ResolverReference resolver = 3;
  }
}

message Batch {
  repeated Call calls = 1;
}

message Call {
  bytes to = 1;
  optional bytes value = 2;
  optional bytes data = 3;
}

message ResolverReference {
  bytes resolver_address = 1;
  bytes resolver_data = 2;
}

UWULinkRequest is the top-level message and contains chain_id and request_type (either Batch or ResolverReference).

The to field of Call and the resolver_address field of ResolverReference are 20-byte addresses. Wallets must verify that these fields are exactly 20 bytes long. The value field is optional (up to 32 bytes); if omitted or empty, it is treated as 0 ETH. Leading zero bytes are removed during encoding, so 1 wei, for example, is represented by a single byte, 0x01.

Why use Protobuf?

Protocol Buffers (Protobuf) is a binary serialization format developed by Google. Compared with text formats such as JSON, it can represent the same data in much less space. For example, common values such as chain ID 1 can be represented in 1–2 bytes, and a 20-byte address can be stored directly. These size savings matter on channels with limited capacity, such as QR codes and NFC tags.

Static Mode

In Static Mode, the dApp embeds the list of calls it wants to execute directly in the request.

Consider a token swap on a DEX as an example of the Static Mode flow.

Alice wants to exchange tokens on a DEX using her mobile wallet. Because she cares about privacy, she does not want to connect her wallet to the DEX.

The DEX displays a UWULink QR code. The QR code contains the following two calls as a batch.

  1. Call approve on the token contract to authorize the DEX router to spend the tokens.
  2. Call swapExactTokensForTokens on the DEX router to execute the swap.

Alice scans the QR code, reviews the details displayed in her wallet, and approves the request. The two calls execute as a single atomic transaction, so if the swap fails, the approval is reverted as well.

The DEX does not learn Alice's address in advance; the address becomes public only when the transaction is recorded on the blockchain.

sequenceDiagram
    participant D as DEX dApp
    participant Q as QRコード
    participant W as Aliceのウォレット
    participant C as ブロックチェーン

    D->>Q: UWULinkリクエストをエンコード
    Note over Q: approve + swap の2コール
    W->>Q: QRコードをスキャン
    Q-->>W: UWULinkRequest(Static Mode)
    W->>W: デコード・表示・ユーザー確認
    W->>C: アトミックバッチトランザクション送信
    C-->>W: 実行結果

Comparison of Static Mode and Programmable Mode

Programmable Mode

Programmable Mode references an on-chain Resolver contract to generate the list of calls dynamically. The request contains only the Resolver contract address and input data, keeping the QR/NFC payload small.

The Resolver contract must implement the following interface.

javascript
interface UWUResolver {
    struct Call {
        address target;
        uint256 value;
        bytes data;
    }

    error CallGenerationFailure(uint256 errorCode);

    function getCalls(address requester, bytes calldata data)
        external returns (Call[] memory calls);

    function getErrorCodeDetails(uint256 errorCode)
        external returns (string memory information);
}
getCalls

This function receives the wallet address (requester) and input data (data) and returns the list of calls to execute.

  • Parameters
    • requester The wallet passes its own address so the Resolver can return user-specific results. The address is not visible to the dApp server or UI; it is sent only to the RPC server used by the wallet.
    • data Arbitrary data supplied by the dApp, such as the type of action or a campaign ID.
  • Return value
    • The list of calls to execute (Call[]).
  • This function may modify state. The wallet invokes it off-chain using eth_call.
getErrorCodeDetails

This function returns details about the error code associated with a CallGenerationFailure error.

  • This information is intended for developers and should not be displayed to users by the wallet.

When a wallet receives a Programmable Mode request, it follows these steps.

  1. Execute getCalls(userAddress, resolver_data) via eth_call against resolver_address with from = address(0), at the latest block.
  2. If the call succeeds, display the returned list of calls to the user and request confirmation, as in Static Mode.
  3. If the call fails (because it reverts or is not implemented), abort the request and display an error to the user.

Consider claiming multiple airdrops at once as an example of the Programmable Mode flow.

Bob visits an airdrop dApp. Rather than requesting a wallet connection, the dApp displays a UWULink QR code.

The QR code contains only the Resolver contract address and a campaign ID. When Bob scans it, the wallet invokes the Resolver contract's getCalls function with Bob's address. The Resolver contract determines that Bob can claim three types of tokens—TokenA, TokenB, and TokenC—and returns three claim calls.

Bob reviews the details displayed in his wallet and approves the request, executing all three claims in one transaction. The on-chain contract has generated a personalized list of calls without the dApp ever learning Bob's address.

Additional considerations

Backward compatibility

UWULink is an additive protocol that does not break existing standards. Wallets that do not recognize the uwulink: scheme simply ignore the request. Its format differs from that of EIP681 QR codes, so there is no risk of accidentally processing it as an EIP-681 request.

The Protobuf schema is forward-compatible with future extensions. Even if new fields are added, such as an expiration time or origin domain, older wallets can ignore them and process the core request.

Comparison with existing wallet communication standards

Comparison with existing standards

Criterion EIP681 WalletConnect EIP5792 UWULink
Communication direction One-way Bidirectional Bidirectional One-way
Batch support No (single transaction) Yes Yes Yes
Privacy Low (URI may include an address) Medium (via relay) Low (connection required) High (address not disclosed)
Encoding Text (URI) JSON JSON-RPC Binary (Protobuf)
Suitability for QR/NFC Medium Low (session required) Low (connection required) High
Dynamic call generation No Yes (dApp-side) Yes (dApp-side) Yes (on-chain)

Security

Privacy

With UWULink, the wallet does not disclose its address or wallet information to the dApp. However, in Programmable Mode, the wallet passes the user's address to the Resolver contract via eth_call, so the RPC provider can see that address. This is comparable to the risk of ordinary dApp usage, but privacy-conscious users should consider Static Mode or a privacy-preserving RPC provider.

Phishing and malicious QR codes

Scanning a malicious QR code and approving its request without reviewing it could cause a user to transfer funds to an attacker or approve tokens for an attacker. Wallets must present readable information, such as ENS names for contract addresses, decoded function selectors, and warnings about large value transfers or token allowances.

Trust in Resolver contracts

In Programmable Mode, the user trusts the Resolver contract to return a legitimate list of calls. A malicious Resolver could ignore the input data and return a call that sends all of the user's ETH to an attacker. The wallet displays the calls returned by the Resolver and requests user confirmation, just as in Static Mode. Resolver contracts should ideally be open source and verified.

Disruption through oversized payloads

A malicious dApp could construct a very large UWULink payload and cause the wallet app to crash or slow down. Wallets should impose a payload size limit. Similarly, a Resolver contract could return a large result. Limiting the gas supplied to eth_call can mitigate this risk.

Unknown request origin

In conventional wallet connection flows, the wallet can identify the domain from which a request originates and apply allowlists or blocklists. With UWULink, the request originates from a QR code scanned by the user, and no domain information is available. The wallet therefore cannot apply domain-based filtering. Users must verify the request contents themselves before approving it, making accurate presentation by the wallet even more important.

References

Conclusion

This article covered ERC7946 (UWULink).

The protocol allows batch transactions to be executed using only a QR code or NFC, without connecting a wallet. It offers a user experience in which multiple contract calls can be completed with one scan while protecting privacy. Its two modes, Static Mode and Programmable Mode, support a wide range of use cases, from simple payments to complex airdrop claims.

I also write articles elsewhere; feel free to explore them.