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

Display voucher destination #215

Closed
guidanoli opened this issue Jul 16, 2024 · 4 comments
Closed

Display voucher destination #215

guidanoli opened this issue Jul 16, 2024 · 4 comments
Labels
Status: Needs triage Explorer team assessment needed Type: Feature Add a new feature to the system

Comments

@guidanoli
Copy link

📄 Context

As of Cartesi Rollups SDK v1, a voucher is made of two components: a destination and a payload.
The Web UI of the Rollups Explorer, however, only shows one of them: the payload.
The destination is a crucial part of the payload, it is who the contract will be calling.
From a payload, you may be able to know which Solidity function will be called, but not who.

image

✔️ Solution

Add the destination address to the Web UI of vouchers.
A plus would be adding a link to the address in a trusted explorer, which may depend on the network.

@guidanoli guidanoli added Status: Needs triage Explorer team assessment needed Type: Feature Add a new feature to the system labels Jul 16, 2024
@github-project-automation github-project-automation bot moved this to 📌 Todo in Explorer Unit Jul 16, 2024
@guidanoli
Copy link
Author

Observation: For Cartesi Rollups SDK v2, vouchers will have one extra component: the amount of Wei that will be passed along the message call, which we usually call the "value". Furthermore, there will also be DELEGATECALL vouchers, which only have destination and payload. The destination is typically the address of a library, and the payload is also typically an encoded Solidity function call.

@guidanoli
Copy link
Author

Also, IMO, it makes no sense to display the voucher as text or JSON. It normally encodes a Solidity function call. A safe way to better display vouchers would be to obtain the ABI of the destination contract through its address, and decode the payload as a function call, displaying all of its arguments, nicely typed, etc. What do you think, @tuler?

@tuler
Copy link
Member

tuler commented Jul 16, 2024

Related to #156

@brunomenezes
Copy link
Collaborator

Also, IMO, it makes no sense to display the voucher as text or JSON. It normally encodes a Solidity function call. A safe way to better display vouchers would be to obtain the ABI of the destination contract through its address, and decode the payload as a function call, displaying all of its arguments, nicely typed, etc. What do you think, @tuler?

I will close that one as it is related to #156 and #165. Once the issues are merged, we will display the decoded content as JSON.

@github-project-automation github-project-automation bot moved this from 📌 Todo to 📦 Done in Explorer Unit Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs triage Explorer team assessment needed Type: Feature Add a new feature to the system
Projects
Archived in project
Development

No branches or pull requests

3 participants