{"eip":681,"title":"URL Format for Transaction Requests","description":"A standard way of representing various transactions, especially payment requests in ether and ERC-20 tokens as URLs.","authors":["Daniel A. Nagy (@nagydani)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2017-08-01","requires":[20,137],"discussionsTo":"https://ethereum-magicians.org/t/erc-681-representing-various-transactions-as-urls","repo":"ERCs","label":"ERC-681","officialUrl":"https://eips.ethereum.org/EIPS/eip-681","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-681.md","url":"https://eips.huatuo.xyz/eip-681/","tldr":{"en":"Defines ethereum: URLs for payment and transaction requests, so a QR code or link can open any wallet with the recipient, amount, token and chain already filled in.","ja":"支払いやトランザクションの要求を表す ethereum: URL を定義。QR コードやリンクから、宛先・金額・トークン・チェーンが入力済みの状態で任意のウォレットを開ける。","ko":"결제와 트랜잭션 요청을 위한 ethereum: URL을 정의한다. QR 코드나 링크로 수신자, 금액, 토큰, 체인이 미리 채워진 상태에서 어떤 지갑이든 열 수 있다.","zh":"定义用于支付和交易请求的 ethereum: URL，使二维码或链接能打开任意钱包，并预先填好收款方、金额、代币和链。"},"tags":["wallet","uri","payments","qr-code"],"explainers":{"en":{"lang":"en","tldr":"Defines ethereum: URLs for payment and transaction requests, so a QR code or link can open any wallet with the recipient, amount, token and chain already filled in.","tags":["wallet","uri","payments","qr-code"],"related":[20,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-681/","markdown":"## What problem does it solve?\n\nBitcoin's `bitcoin:` URLs made \"scan to pay\" easy: a shop shows a QR code, your wallet opens with the address and amount ready. Ethereum had no common format, so each wallet and point-of-sale app invented its own, or users copied addresses by hand.\n\nERC-681 standardizes an `ethereum:` URL that any wallet can parse. It covers plain ether payments, [ERC-20](/eip-20/) token payments and, more generally, calls to any contract function.\n\n## How it works\n\nThe syntax:\n\n```\nethereum:[pay-]\u003caddress\u003e[@\u003cchain_id\u003e][/\u003cfunction\u003e][?\u003cparams\u003e]\n```\n\n- **address**: a `0x` hex address or an ENS name ([ERC-137](/eip-137/)). Mandatory.\n- **chain_id**: optional decimal chain ID. Without it, the wallet uses its current network.\n- **function**: optional. If omitted, the URL asks for a native ether payment. If present, it names a contract function to call.\n- **params**: `value`, `gasLimit` (or `gas`), `gasPrice`, or ABI type names such as `address=` and `uint256=` for function arguments.\n\nAmounts are in the smallest unit (wei, or token base units) and may use scientific notation. `value=2.014e18` means 2.014 ETH. Only integers are allowed, so the exponent must cover all decimals.\n\nAll values are suggestions: the wallet shows them to the user, who may edit them before signing.\n\n## Sample code\n\nExample URLs:\n\n```text\n# Pay 2.014 ETH\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\n\n# Same, but only on chain 1 (mainnet)\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=2.014e18\n\n# ERC-20: call transfer(address,uint256) on the token contract\nethereum:\u003ctokenAddress\u003e/transfer?address=\u003crecipient\u003e\u0026uint256=1e6\n```\n\nBuilding a token request in TypeScript (ethers v6):\n\n```ts\nimport { getAddress, parseUnits } from \"ethers\";\n\nfunction erc681Transfer(token: string, to: string, amount: string, decimals: number, chainId = 1) {\n  const units = parseUnits(amount, decimals);          // e.g. \"1.5\", 6 -\u003e 1500000n\n  return `ethereum:${getAddress(token)}@${chainId}/transfer` +\n         `?address=${getAddress(to)}\u0026uint256=${units}`;\n}\n```\n\n## Things to know\n\n- For tokens, the URL targets the **token contract**, and the recipient goes in the `address` parameter. Mixing these up sends a request to the wrong place.\n- Hex addresses always take precedence over ENS names. A wallet must never try to resolve something that looks like `0x` + 40 hex digits as ENS, which blocks a phishing trick.\n- URLs can be tampered with in transit. Only trust payment links from authenticated sources, and show the amount clearly, ideally in token units using the contract's `decimals()`.\n- Without `@chain_id`, the wallet uses whatever network it is on. Include the chain ID for anything outside mainnet so a payment is not sent on the wrong chain.\n- ERC-681 supersedes the older ERC-67 format and stays compatible with it for the simple \"address only\" case. The `pay-` prefix is reserved so future incompatible versions can use a different prefix.\n"},"ja":{"lang":"ja","tldr":"支払いやトランザクションの要求を表す ethereum: URL を定義。QR コードやリンクから、宛先・金額・トークン・チェーンが入力済みの状態で任意のウォレットを開ける。","tags":["wallet","uri","payments","qr-code"],"related":[20,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-681/","markdown":"## 何を解決するのか\n\nBitcoin の `bitcoin:` URL は「スキャンして支払う」を簡単にしました。店が QR コードを表示すると、あなたのウォレットがアドレスと金額を入力済みの状態で開きます。Ethereum には共通の形式がなく、ウォレットや POS アプリごとに独自の形式を作るか、ユーザーが手作業でアドレスをコピーしていました。\n\nERC-681 は、どのウォレットでも解析できる `ethereum:` URL を標準化します。通常のエーテル支払い、[ERC-20](/eip-20/) トークンの支払い、そしてより一般的に、任意のコントラクト関数の呼び出しを扱えます。\n\n## 仕組み\n\n構文は次のとおりです。\n\n```\nethereum:[pay-]\u003caddress\u003e[@\u003cchain_id\u003e][/\u003cfunction\u003e][?\u003cparams\u003e]\n```\n\n- **address**: `0x` で始まる 16 進アドレス、または ENS 名（[ERC-137](/eip-137/)）。必須です。\n- **chain_id**: 任意の 10 進数のチェーン ID。省略すると、ウォレットは現在のネットワークを使います。\n- **function**: 任意。省略すると、ネイティブのエーテル支払いを求める URL になります。指定すると、呼び出すコントラクト関数の名前になります。\n- **params**: `value`、`gasLimit`（または `gas`）、`gasPrice`、または関数の引数を表す `address=` や `uint256=` などの ABI 型名。\n\n金額は最小単位（wei、またはトークンの基本単位）で、指数表記を使えます。`value=2.014e18` は 2.014 ETH を意味します。整数のみが許されるため、指数はすべての小数桁をカバーする必要があります。\n\nすべての値は提案にすぎません。ウォレットはそれをユーザーに表示し、ユーザーは署名前に編集できます。\n\n## サンプルコード\n\nURL の例:\n\n```text\n# Pay 2.014 ETH\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\n\n# Same, but only on chain 1 (mainnet)\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=2.014e18\n\n# ERC-20: call transfer(address,uint256) on the token contract\nethereum:\u003ctokenAddress\u003e/transfer?address=\u003crecipient\u003e\u0026uint256=1e6\n```\n\nTypeScript（ethers v6）でトークンの要求を組み立てる:\n\n```ts\nimport { getAddress, parseUnits } from \"ethers\";\n\nfunction erc681Transfer(token: string, to: string, amount: string, decimals: number, chainId = 1) {\n  const units = parseUnits(amount, decimals);          // e.g. \"1.5\", 6 -\u003e 1500000n\n  return `ethereum:${getAddress(token)}@${chainId}/transfer` +\n         `?address=${getAddress(to)}\u0026uint256=${units}`;\n}\n```\n\n## 知っておくべきこと\n\n- トークンの場合、URL の宛先は**トークンコントラクト**で、受取人は `address` パラメータに入れます。これらを取り違えると、要求が間違った場所に送られます。\n- 16 進アドレスは常に ENS 名より優先されます。ウォレットは、`0x` + 16 進数 40 桁に見えるものを ENS として解決しようとしてはいけません。これはフィッシングの手口を防ぎます。\n- URL は転送中に改ざんされる可能性があります。支払いリンクは認証された送信元のものだけを信頼し、金額を明確に、できればコントラクトの `decimals()` を使ったトークン単位で表示してください。\n- `@chain_id` がない場合、ウォレットは現在接続しているネットワークを使います。メインネット以外では、支払いが間違ったチェーンで送られないよう、チェーン ID を含めてください。\n- ERC-681 は古い ERC-67 形式に取って代わるもので、単純な「アドレスのみ」の場合は互換性を保ちます。`pay-` プレフィックスは、将来の非互換なバージョンが別のプレフィックスを使えるように予約されています。\n"},"ko":{"lang":"ko","tldr":"결제와 트랜잭션 요청을 위한 ethereum: URL을 정의한다. QR 코드나 링크로 수신자, 금액, 토큰, 체인이 미리 채워진 상태에서 어떤 지갑이든 열 수 있다.","tags":["wallet","uri","payments","qr-code"],"related":[20,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-681/","markdown":"## 어떤 문제를 해결하나요?\n\n비트코인의 `bitcoin:` URL은 \"스캔해서 결제\"를 쉽게 만들었습니다. 가게가 QR 코드를 보여 주면 지갑이 주소와 금액이 준비된 채로 열립니다. 이더리움에는 공통 형식이 없어서 지갑과 POS 앱마다 자기만의 형식을 만들거나, 사용자가 주소를 직접 복사해야 했습니다.\n\nERC-681은 어떤 지갑이든 파싱할 수 있는 `ethereum:` URL을 표준화합니다. 일반 이더 결제, [ERC-20](/eip-20/) 토큰 결제, 그리고 더 일반적으로 임의의 컨트랙트 함수 호출까지 다룹니다.\n\n## 어떻게 동작하나요?\n\n문법은 다음과 같습니다.\n\n```\nethereum:[pay-]\u003caddress\u003e[@\u003cchain_id\u003e][/\u003cfunction\u003e][?\u003cparams\u003e]\n```\n\n- **address**: `0x`로 시작하는 16진수 주소 또는 ENS 이름([ERC-137](/eip-137/)). 필수입니다.\n- **chain_id**: 선택적인 10진수 체인 ID. 생략하면 지갑은 현재 네트워크를 사용합니다.\n- **function**: 선택. 생략하면 URL은 네이티브 이더 결제를 요청합니다. 있으면 호출할 컨트랙트 함수의 이름입니다.\n- **params**: `value`, `gasLimit`(또는 `gas`), `gasPrice`, 또는 함수 인자를 위한 `address=`, `uint256=` 같은 ABI 타입 이름.\n\n금액은 가장 작은 단위(wei 또는 토큰의 기본 단위)이며 과학적 표기법을 쓸 수 있습니다. `value=2.014e18`은 2.014 ETH를 뜻합니다. 정수만 허용되므로 지수가 모든 소수 자릿수를 덮어야 합니다.\n\n모든 값은 제안일 뿐입니다. 지갑이 이를 사용자에게 보여 주고, 사용자는 서명 전에 수정할 수 있습니다.\n\n## 샘플 코드\n\nURL 예시:\n\n```text\n# Pay 2.014 ETH\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\n\n# Same, but only on chain 1 (mainnet)\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=2.014e18\n\n# ERC-20: call transfer(address,uint256) on the token contract\nethereum:\u003ctokenAddress\u003e/transfer?address=\u003crecipient\u003e\u0026uint256=1e6\n```\n\nTypeScript(ethers v6)로 토큰 요청 만들기:\n\n```ts\nimport { getAddress, parseUnits } from \"ethers\";\n\nfunction erc681Transfer(token: string, to: string, amount: string, decimals: number, chainId = 1) {\n  const units = parseUnits(amount, decimals);          // e.g. \"1.5\", 6 -\u003e 1500000n\n  return `ethereum:${getAddress(token)}@${chainId}/transfer` +\n         `?address=${getAddress(to)}\u0026uint256=${units}`;\n}\n```\n\n## 알아둘 점\n\n- 토큰의 경우 URL이 가리키는 대상은 **토큰 컨트랙트**이고, 수신자는 `address` 파라미터에 들어갑니다. 이 둘을 헷갈리면 요청이 엉뚱한 곳으로 갑니다.\n- 16진수 주소는 항상 ENS 이름보다 우선합니다. 지갑은 `0x` + 16진수 40자리처럼 보이는 것을 ENS로 해석하려 해서는 안 되며, 이는 피싱 수법을 막아 줍니다.\n- URL은 전송 중에 변조될 수 있습니다. 인증된 출처의 결제 링크만 신뢰하고, 금액을 명확하게, 가능하면 컨트랙트의 `decimals()`를 사용한 토큰 단위로 표시하세요.\n- `@chain_id`가 없으면 지갑은 현재 연결된 네트워크를 사용합니다. 메인넷이 아닌 경우에는 결제가 엉뚱한 체인으로 전송되지 않도록 체인 ID를 포함하세요.\n- ERC-681은 이전의 ERC-67 형식을 대체하며, 단순한 \"주소만 있는\" 경우에는 호환성을 유지합니다. `pay-` 접두사는 미래의 호환되지 않는 버전이 다른 접두사를 쓸 수 있도록 예약되어 있습니다.\n"},"zh":{"lang":"zh","tldr":"定义用于支付和交易请求的 ethereum: URL，使二维码或链接能打开任意钱包，并预先填好收款方、金额、代币和链。","tags":["wallet","uri","payments","qr-code"],"related":[20,137,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-681/","markdown":"## 它解决什么问题？\n\n比特币的 `bitcoin:` URL 让\"扫码支付\"变得简单：商店展示二维码，你的钱包打开后地址和金额已经就绪。以太坊没有通用格式，因此每个钱包和收银应用都自创一套，或者用户手动复制地址。\n\nERC-681 标准化了一种任何钱包都能解析的 `ethereum:` URL。它涵盖普通的以太币支付、[ERC-20](/eip-20/) 代币支付，更一般地，还涵盖对任意合约函数的调用。\n\n## 它如何运作\n\n语法如下：\n\n```\nethereum:[pay-]\u003caddress\u003e[@\u003cchain_id\u003e][/\u003cfunction\u003e][?\u003cparams\u003e]\n```\n\n- **address**：以 `0x` 开头的十六进制地址，或 ENS 名称（[ERC-137](/eip-137/)）。必填。\n- **chain_id**：可选的十进制链 ID。省略时，钱包使用其当前网络。\n- **function**：可选。省略时，URL 请求的是原生以太币支付。若存在，则表示要调用的合约函数名。\n- **params**：`value`、`gasLimit`（或 `gas`）、`gasPrice`，或用于函数参数的 ABI 类型名，如 `address=` 和 `uint256=`。\n\n金额以最小单位（wei 或代币的基本单位）表示，可以使用科学计数法。`value=2.014e18` 表示 2.014 ETH。只允许整数，所以指数必须覆盖所有小数位。\n\n所有值都只是建议：钱包会把它们展示给用户，用户可以在签名前修改。\n\n## 示例代码\n\nURL 示例：\n\n```text\n# Pay 2.014 ETH\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\n\n# Same, but only on chain 1 (mainnet)\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=2.014e18\n\n# ERC-20: call transfer(address,uint256) on the token contract\nethereum:\u003ctokenAddress\u003e/transfer?address=\u003crecipient\u003e\u0026uint256=1e6\n```\n\n用 TypeScript（ethers v6）构造代币请求：\n\n```ts\nimport { getAddress, parseUnits } from \"ethers\";\n\nfunction erc681Transfer(token: string, to: string, amount: string, decimals: number, chainId = 1) {\n  const units = parseUnits(amount, decimals);          // e.g. \"1.5\", 6 -\u003e 1500000n\n  return `ethereum:${getAddress(token)}@${chainId}/transfer` +\n         `?address=${getAddress(to)}\u0026uint256=${units}`;\n}\n```\n\n## 需要注意\n\n- 对于代币，URL 指向的是**代币合约**，收款方放在 `address` 参数中。把二者搞混会把请求发到错误的地方。\n- 十六进制地址始终优先于 ENS 名称。钱包绝不能把形如 `0x` + 40 位十六进制数字的内容当作 ENS 去解析，这样可以阻止一种钓鱼手法。\n- URL 在传输过程中可能被篡改。只信任来自可验证来源的支付链接，并清晰展示金额，最好使用合约的 `decimals()` 以代币单位显示。\n- 没有 `@chain_id` 时，钱包使用它当前所在的网络。对于主网以外的任何场景，请包含链 ID，以免支付发送到错误的链上。\n- ERC-681 取代了较早的 ERC-67 格式，并在简单的\"仅地址\"情形下与之保持兼容。`pay-` 前缀被保留，以便将来不兼容的版本可以使用不同的前缀。\n"}},"requiredBy":[831,1078,2400,5094]}
