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

Discussions: EIP-4430 #4431

Closed
ricmoo opened this issue Nov 7, 2021 · 5 comments
Closed

Discussions: EIP-4430 #4431

ricmoo opened this issue Nov 7, 2021 · 5 comments

Comments

@ricmoo
Copy link
Contributor

ricmoo commented Nov 7, 2021

A discussions issue to track comments on EIP-4430.

Simple Summary

A technique for contract authors to enable wallets to provide a human-readable description of the effect of of a transaction with a given contract.

Abstract

Use a contract method to provide virtual funcions which can generate a human-readable description at the same time as the machine-readable bytecode, allowing the user to agree to the human-readable component in a UI while the machine can execute the bytecode once accepted.

@ricmoo
Copy link
Contributor Author

ricmoo commented Nov 11, 2021

This is not at compilation time like doxygen, if I understand your question.

for some background, you can check out EIP-3224 which this was originally part of but was requested to be split into two separate EIPs.

This is a method the contract author adds, which is compiled into the contract though.

Imagine if your contract had a method like: approveProposal(bytes32 hash, bytes signature) which would use ecrecovery to vote your address as accepting the proposal. The best things like MetaMask could do today is present you with a UX of “do you agree to this? { Scary Hash Goes Here }”.

This would allow a virtual function, which MetaMask can generically understand (i.e. MetaMask doesn’t even have to have know about your contract before and didn’t need to include any additional custom config) may look like acceptProposal(string name, uint date, uint[] payouts, address[] recipients), which would return 2 things:

  • the string to display to the user, “do you agree to the propose ‘pay the devs’, on November 11, 2021 to pay ricmoo.eth an amount of 1.21 eth, nick.eth an amount of 2.3 eth and 0x1234567…6754 an amount of 0.6 eth?”
  • The bytes necessary from the non-virtual function, approveProosal(bytes32,bytes)

So MetaMask can give the user a meaningful description and once agreed, MetaMask can sign the payload, and do whatever the signed payload should do (likely submit them to a server which would then send the transaction or commit it to a state channel).

I’ll be adding more examples to this soon. Right now I’m just getting the EIP broken into the 4 separate EIPs I was suggested to do. :)

@mryalamanchi
Copy link
Contributor

Hello Richard. This is an interesting eip, possibly, improving towards the UX for the web3 users. Thanks for the submission!

As I understand, per the original discussion on eip-3224, you are in the process of splitting it into 4 seperate EIPs to address the UX issue for web3 users.

web3 user's UX issue: "I want to know what's happening when I am interacting with the dApps, explained in plain words", if possible in the user's locale.

I am currently going through eip-3224 and it's pre-requisite eip to better understand. Please be patient, I will reach out to you shortly.

@ethereum ethereum deleted a comment Feb 12, 2022
@ethereum ethereum deleted a comment Feb 12, 2022
@PradhumnaPancholi
Copy link

Thanks for the brief explanation, @ricmoo. I will stick around this one and help as much as possible (I am with ECH, pursuing my way to become an EIP editor).

@ricmoo
Copy link
Contributor Author

ricmoo commented Mar 31, 2022

This has been updated in the EIP; the discussions thread is now located on Ethereum Magicians.

@Pandapip1
Copy link
Member

This should be closed. It is no longer a discussions-to link. CC @MicahZoltu

@ethereum ethereum locked and limited conversation to collaborators Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants
@axic @MicahZoltu @ricmoo @mryalamanchi @PradhumnaPancholi @Pandapip1 and others