Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL Format for Transaction Requests (EIP681) is poorly supported #9183

Closed
3esmit opened this issue Oct 11, 2019 · 6 comments · Fixed by #10280
Closed

URL Format for Transaction Requests (EIP681) is poorly supported #9183

3esmit opened this issue Oct 11, 2019 · 6 comments · Fixed by #10280
Labels
feature feature requests

Comments

@3esmit
Copy link
Member

3esmit commented Oct 11, 2019

EIP681 is supported only in QRCodes and the specification is partially supported.

EIP681 - URL Format for Transaction Requests

https://eips.ethereum.org/EIPS/eip-681
A link that pop up a transaction in the wallet.
In Status.im: Useful as chat message and for dapp support.

Examples

Donate 0.314 SNT (0x744d70fdbe2ba4cf95131626614a1763df805b9e) to 3esmit's address (0x3d597789ea16054a084ac84ce87f50df9198f415), no ens:
ethereum:0x744d70fdbe2ba4cf95131626614a1763df805b9e/transfer?address=0x3d597789ea16054a084ac84ce87f50df9198f415&uint256=314e17

Donate 0.1337 SNT to 3esmit.stateofus.eth using ens for token (snt.thetoken.eth) and for destination address:
ethereum:snt.thetoken.eth/transfer?address=3esmit.stateofus.eth&uint256=1337e17

Donate 0.011 SNT to 3esmit.stateofus.eth using ens only for destination address:
ethereum:0x744d70fdbe2ba4cf95131626614a1763df805b9e/transfer?address=3esmit.stateofus.eth&uint256=11e16

Donate 2.014 ETH to Ethereum Foundation with manual gas settings:
ethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18&gasPrice=1000000000&gasLimit=100000

Related

#7214
#7325
#8150

Code

https://github.com/status-im/status-react/blob/develop/src/status_im/ethereum/eip681.cljs

@acolytec3
Copy link
Contributor

Could I take a stab at this? I just fixed a bug in #8960 where EIP681 URIs embedded in QR codes seems to work right on the send-transaction screen and would love to dig a bit deeper into understanding this EIP.

@3esmit
Copy link
Member Author

3esmit commented Oct 17, 2019

The issue here refers as EIP681 being fully supported in Status.
It must be breakdown into two types of issue

Specification related

Implementation related

    • a) should only accept if user in same chainId, or; b) suggest change chainId, or; c) force signature in that chainId.
    • EIP681 link in qrcode scanned should display wallet transaction request
    • EIP681 link in public chat should display wallet transaction request
    • EIP681 link in browser should display wallet transaction request

To implement number 5. and 6. it needs discussion and design input.
It would look like similar to this:
image

It should also support any call, i.e. to any smart contract, with any data. But this should be safely done, and displayed clearly for user inspection - EIP681 already force link with decoded ABI (one less problem there)

If you want to work in 1. ENS names must resolve I can open one issue detailing more about it.

@3esmit 3esmit changed the title URL Format for Transaction Requests "universal links" EIP681 in v1 URL Format for Transaction Requests (EIP681) is poorly supported Oct 17, 2019
@acolytec3
Copy link
Contributor

@3esmit, definitely, would love to take that on.

@acolytec3
Copy link
Contributor

@3esmit in terms of ENS resolution, is it necessary that the resolution happen within the EIP681 module code or can that module just verify the ens address is constructed correctly and leave it to the view that calls the eip681/parse-uri method to then call ens/get-addr similar to how the wallet/send-transaction view does it?

@3esmit
Copy link
Member Author

3esmit commented Oct 18, 2019

@acolytec3 See #9238

It should only validate the ENS_NAME, but the resolve is up to the UI.

@flexsurfer
Copy link
Member

@3esmit is this still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants