EIPs Explained

ERC-67 · Withdrawn · ERC · 2016-02-17

ERC-67: URI Scheme with Metadata, Value and Bytecode

An early, withdrawn format for packing an Ethereum transaction (recipient, value, gas and bytecode) into an ethereum: URI for QR codes and links, later replaced by ERC-681.

What problem does it solve?

In 2016 there was no standard way to say "please send this transaction" outside a wallet. A shop that wanted 12.34 ETH for an order, or a dapp that wanted the user to call a contract function, had to build its own workaround. The spec describes one: exchanges created large numbers of temporary deposit addresses just to tell which payment belonged to which customer.

Bitcoin had already solved this with BIP 21 bitcoin: URIs. EIP-67 proposed the same idea for Ethereum and went further. The URI could carry contract-call data as well as an address and an amount. A wallet that scanned the QR code or opened the link would pre-fill the whole transaction, and the user would only pick an account and approve.

How it works

The basic shape follows BIP 21:

ethereum:<address>[?value=<value>][?gas=<suggestedGas>][?data=<bytecode>]
  • address: the recipient or contract.
  • value: how much ether to send. It may be zero.
  • gas: a suggested gas limit.
  • data: raw calldata to include in the transaction.

The spec also sketches a human-readable alternative. Instead of raw data, the URI names a function, such as function=transfer(address 0x..., uint 5), and the wallet encodes the calldata itself.

The spec deliberately leaves out free-text label or message fields. It argues that such information should come from an identity system or the chain, not from the link.

Sample code

A token transfer as raw calldata (0xa9059cbb is the transfer(address,uint256) selector), adapted from the spec:

ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7?gas=100000&data=0xa9059cbb00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000000005

The same request in the readable form:

ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7?gas=100000&function=transfer(address 0xdeadbeef, uint 5)

For new code, use the ERC-681 syntax instead:

ethereum:0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7/transfer?address=0x8e23Ee67d1332aD560396262C48ffbB01f93d052&uint256=1

Things to know

  • This proposal is Withdrawn. It was superseded by ERC-681, which defines ethereum: payment and call requests with proper value units, chain IDs and typed function parameters.
  • ERC-831 later defined the general ethereum: URI container and kept EIP-67 links valid as the default pay- case. A URI that starts directly with 0x is therefore still read as a payment request.
  • The spec's own syntax is a little inconsistent: it shows ? before every parameter, while its examples correctly use & after the first one.
  • The Rationale and Security Considerations sections were never written. Wallets should still show a decoded summary of any URI-driven transaction before the user signs.

#uri #qr-code #payments #wallet #withdrawn

Details

Authors
Alex Van de Sande (@alexvansande)
Status
Withdrawn
Type
Standards Track / ERC
Created
2016-02-17
Required by

Machine-readable: Markdown · JSON