-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature Proposal: Adding Buttons for Cell Data Decoding #331
Comments
We can use pegjs to parse the |
Personally, I have doubts about the necessity of this feature. Unlike Ethereum, where it is an uncommon and SUPER expensive practice to store textual content in However, writing a byte to So I think "decode data in UTF-8" is just a corner case, and maybe we should think more about this feature |
It's not limited to As I briefly mentioned in the discord channel, I suggest running a node.js service to go through cells and translate their raw data into business data with the help of dapps' SDKs. The data should be explained by the dapp providers. Furthermore, we can expose an API to accept decoded data of a transaction and authenticates dapp providers to decode the data. Once the decoding service can be deployed standalone, we can run it ourselves. |
We can move this issue to #469 , it's also related to the way we display transaction information. |
About whether this new feature needs a prompt/tips. 关于此新功能是否需要提示。 |
LGTM, it's better to have a Copy button next to the decoded content |
Partially done by nervosnetwork/ckb-explorer-frontend@4710e4c Available in And https://pudge.explorer.nervos.org/transaction/0x6df4dc73413a50318dace027a70725fb137184beb8802306daa4a0283860c8a8 |
The decoder positioning will shift when used on the page, sometimes thinking that the current information cannot be decoded. 2024-04-03.13.59.19.mov |
It should have been optimized |
On which PR was the optimization performed? You can post a link. |
https://pudge.explorer.nervos.org/transaction/0x5dc3868ae53725530b6bd74965d9576880f2858a34b2f9ede6a6d0e4ac310f22
The position of the encoding pop-up window after clicking is as shown in the video. |
Discussed in #324
Originally posted by Flouse May 16, 2023
Recently, I created a simple tutorial showing how to inscribe "Hello Common Knowledge Base!" or any message to CKB Testnet. @quake suggested a new feature for CKB Explorer. And I think it is worth discussing here.
Problem
The data stored in CKB cells usually is not human-readable formats. It can be difficult for users to interpret this data.
The above cell data is the hexadecimal format of "Hello Common Knowledge Base!".
Related issue
Proposed Feature
We propose some addition of buttons for decoding cell data in the CKB Explorer, similar to Etherscan
These buttons would allow users to easily decode cell data to decimal or UTF-8 string formats.
This feature would be particularly useful for some on-chain scripts such as SUDT and DAO, as their cell data could be easily decoded and interpreted by users.
Functionality
When a user clicks one of the decoding buttons, the corresponding decoder function would be applied to the cell data and the result would be displayed in a new modal or overlay. The decoded data could be displayed in plain text to make it easily accessible to users.
The text was updated successfully, but these errors were encountered: