nervosnetwork / ckb-explorer-frontend

Nervos CKB Explorer Frontend
https://explorer.nervos.org/
MIT License
110 stars 74 forks source link

[FR] Add iCKB Scripts to the Explorer #1784

Open phroi opened 2 weeks ago

phroi commented 2 weeks ago

Hello folks at Nervos Network, iCKB here :wave: After passing both internal and external audit, iCKB scripts have been deployed on Testnet and Mainnet.

Please, could you list the scripts on the explorer?

I'd like to point out a couple of gotchas:

Keep up the Great Work :muscle: Phroi

Keith-CY commented 1 week ago

Hi @phroi appreciate your brilliant work

There are 3 scripts:

They will be labeled by PR https://github.com/nervosnetwork/ckb-explorer-frontend/pull/1788

Before this PR is merged, could you please add the following to each of them:

  1. a brief description of the script
  2. a link to the source code if possible
  3. a link to the docs if possible
phroi commented 1 week ago

Hey @Keith-CY, thank you for creating the pull request draft!! :hugs:

phroi commented 4 days ago

Additionally, @Hanssen0 told me there is a form to submit token info in explorer. I double checked if I could add this data with my commit, but the token data seem to be stored in a DB, not in the repo, I guess to safeguard the token creator email. By the way, good job in returning an already anonymized email directly from the DB for existing tokens :+1::+1:

I looked into the form and I see a couple of potential issues.

xUDT form seems incomplete respectfully to its sUDT counterpart

sudt

VS

xudt

On testnet the form does not seem to allow xUDT(final_rls) as token type

no_xUDT(final_rls)

Edit: Pudge explorer seems to already recognize iCKB xUDT(final_rls) on Testnet as xUDT, so maybe this is not an issue.

@Keith-CY could you provide guidance?

Keith-CY commented 1 day ago

Additionally, @Hanssen0 told me there is a form to submit token info in explorer. I double checked if I could add this data with my commit, but the token data seem to be stored in a DB, not in the repo, I guess to safeguard the token creator email. By the way, good job in returning an already anonymized email directly from the DB for existing tokens 👍👍

I looked into the form and I see a couple of potential issues.

xUDT form seems incomplete respectfully to its sUDT counterpart

sudt

VS

xudt

On testnet the form does not seem to allow xUDT(final_rls) as token type

no_xUDT(final_rls)

Edit: Pudge explorer seems to already recognize iCKB xUDT(final_rls) on Testnet as xUDT, so maybe this is not an issue.

@Keith-CY could you provide guidance?

Hi @phroi sorry for replying late. A complementary convention(https://talk.nervos.org/t/xudt-information-convention-rfc/8030) has been proposed along with the xUDT protocol so basic token info can be published and synced on the chain. The convention covers symbol, decimal and name, so these fields are removed from the form.

A real-world case can be found in the output#1 of transaction https://explorer.nervos.org/transaction/0x56ba1d12aac8064807c088ffbc2481d74ebca78f934e307fc129a0c66cf866fb

image

It was generated by https://github.com/utxostack/rgbpp-sdk/blob/develop/packages/ckb/src/utils/rgbpp.ts#L248-L255