diff --git a/EIPS/eip-681.md b/EIPS/eip-681.md index 1174c3c5..522b0a2c 100644 --- a/EIPS/eip-681.md +++ b/EIPS/eip-681.md @@ -7,7 +7,7 @@ Category: ERC Status: Draft Created: 2017-08-01 - Requires: 20, 137 + Requires: 20, 137, 831 ## Simple Summary A standard way of representing various transactions, especially payment requests in Ethers and ERC #20 tokens as URLs. @@ -32,7 +32,7 @@ Payment request URLs contain "ethereum" in their schema (protocol) part and are ethereum_address = ( "0x" 40*40HEXDIG ) / ENS_NAME parameters = parameter *( "&" parameter ) parameter = key "=" value - key = "value" / "gas" / TYPE + key = "value" / "gas" / "gasLimit" / "gasPrice" / TYPE value = number / ethereum_address / STRING number = [ "-" / "+" ] *DIGIT [ "." 1*DIGIT ] [ ( "e" / "E" ) [ 1*DIGIT ] [ "+" UNIT ] @@ -47,7 +47,7 @@ the blockchain should refuse accepting requests with a non-empty `UNIT`, if it i Note that a `number` can be expressed in *scientific notation*, with a multiplier of a power of 10. The use of this notation is strongly encouraged when expressing monetary value in Ethers or ERC #20 tokens in atomic units (e. g. Wei, in case of Ether). -If *key* in the parameter list is `value` or `gas` then *value* MUST be a `number`. Otherwise, it must correspond to the `TYPE` string used as *key*. +If *key* in the parameter list is `value`, `gasLimit`, `gasPrice` or `gas` then *value* MUST be a `number`. Otherwise, it must correspond to the `TYPE` string used as *key*. For the syntax of ENS_NAME, please consult ERC #137 defining Ethereum Name Service. @@ -70,6 +70,8 @@ If the payer client has access to the blockchain, the interface should display t Note that the indicated amount is only a suggestion (as are all the supplied arguments) which the user is free to change. With no indicated amount, the user should be prompted to enter the amount to be paid. +Similarly `gasLimit` and `gasPrice` are suggested user-editable values for *gas limit* and *gas price*, respectively, for the requested transaction. It is acceptable to abbreviate `gasLimit` as `gas`, the two are treated synonymously. + ## Rationale The proposed format is chosen to resemble `bitcoin:` URLs as closely as possible, as both users and application programmers are already familiar with that format. In particular, this motivated the omission of the unit, which is often used in Ethereum ecosystem. Handling different orders of magnitude is delegated to the application, just like in the case of `bitcoin:`, but lacking access to the block chain, the application can take a hint from the exponent in the URL. Additional parameters may be added, if popular use cases requiring them emerge in practice.