Magickbase / ckb-explorer-public-issues

CKB Explorer Issues
https://explorer.nervos.org/
3 stars 2 forks source link

Display live cells of a specific address #19

Open Keith-CY opened 2 years ago

Keith-CY commented 2 years ago

Cell info

{
    lock: {
      code_hash: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
      hash_type: "type",
      args: "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
    },
    type: {
      code_hash: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
      hash_type: "type",
      args: "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
    },
    out_point: {
      tx_hash: "0xdf45112919d4af12b10fed94a93798ae6ddd8c89a11d90980022dcf695babca9",
      index: "0x0",
    },
    capacity: "0x2540be400",
    data: "0x",
  }
  1. lock: mark script tag
  2. type: mark script tag
  3. out_point: link to tx page
  4. capacity: in variant formats(hex, int)
  5. data: in various formats(hex, utf8)
Keith-CY commented 2 years ago
  1. select and export
  2. filtered by script hash
  3. sorted by capacity/script/outpoint
checkbox | outpoint | lock script tag(click for dialog) | type script tag(click for dialog) | capacity(convert formats) | data(convert formats)
ShiningRay commented 2 years ago

新接口我打算在新的路径下进行开发 /api/v2

Keith-CY commented 2 years ago

新接口我打算在新的路径下进行开发 /api/v2

好的, v2 的接口我们考虑对外部支持, 可以针对 DApp 设计一下, 不用考虑浏览器的需求

ShiningRay commented 2 years ago

新接口我打算在新的路径下进行开发 /api/v2

好的, v2 的接口我们考虑对外部支持, 可以针对 DApp 设计一下, 不用考虑浏览器的需求

你对这个数据结构有什么想法,就是 Cell 需要哪些字段

Keith-CY commented 2 years ago

新接口我打算在新的路径下进行开发 /api/v2

好的, v2 的接口我们考虑对外部支持, 可以针对 DApp 设计一下, 不用考虑浏览器的需求

你对这个数据结构有什么想法,就是 Cell 需要哪些字段

我觉得需要的数据是第一条信息里的 cell 数据结构, 考虑显示友好性的话还希望加上是否是已知的 script, 不过已知 script 可以单独做一个接口

Keith-CY commented 1 year ago

This is a desirable feature we'll support later, please have a look and any suggestion could be added in this issue @Danie0918

Sven-TBD commented 11 months ago

@Keith-CY I made a prototype on this requirement, PRD here, however I did not completely follow the original requirement description.

And I'd like to post a question here. Is there a UID(Unique identification) of a specific live cell? Like the hash of it. If so, I can title/name these different live cells.

Keith-CY commented 11 months ago

@Keith-CY I made a prototype on this requirement, PRD here, however I did not completely follow the original requirement description.

And I'd like to post a question here. Is there a UID(Unique identification) of a specific live cell? Like the hash of it. If so, I can title/name these different live cells.

Sure, each cell has its own unique index, it's called outPoint(https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0019-data-structures/0019-data-structures.md#outpoint) and consists of two fields

When a cell is referenced, its outpoint will be mentioned, e.g. inputs of a transaction

Kirl70 commented 11 months ago

Design Draft (1-3--1-6): https://www.figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=31495%3A29631&mode=design&t=yZJTO5TQ5sYnY7Bg-1

image
Keith-CY commented 6 months ago

Sort by block number is held on due to API missing

Keith-CY commented 6 months ago
image

Feedback to the grid view

  1. UID is a new concept(unique index of a cell, based on hash or other) but it works as Output(which should be named Out Point), clicking it leads to the transaction page;
  2. Block info could be expanded by hovering on Block # and DATE can be included in the expanded info;

cc @Sven-TBD

Sven-TBD commented 6 months ago
image

Feedback to the grid view

  1. UID is a new concept(unique index of a cell, based on hash or other) but it works as Output(which should be named Out Point), clicking it leads to the transaction page;
  2. Block info could be expanded by hovering on Block # and DATE can be included in the expanded info;

cc @Sven-TBD

The list view of Live Cell Tab have been updated. Only labels have been changed, there's no UI change here. cc @Kirl70

image

Please be attention, this list view is only for Live cells tab. For other tabs, the labels should be adjusted as well. @devchenyan cc @Keith-CY

Keith-CY commented 6 months ago
image

Feedback to the grid view

  1. UID is a new concept(unique index of a cell, based on hash or other) but it works as Output(which should be named Out Point), clicking it leads to the transaction page;
  2. Block info could be expanded by hovering on Block # and DATE can be included in the expanded info;

cc @Sven-TBD

The list view of Live Cell Tab have been updated. Only labels have been changed, there's no UI change here. cc @Kirl70 image

Please be attention, this list view is only for Live cells tab. For other tabs, the labels should be adjusted as well. @devchenyan cc @Keith-CY

Now NFT has been divided into 2 types

Sven-TBD commented 6 months ago
  • NFT:

@zmcNotafraid @rabbitz Hi mc, nan, We may need to add a Type label and a Block height label for the live cells api.

Also serial numbers should also be added to the list view. @devchenyan

image
Sven-TBD commented 6 months ago

@devchenyan can you provide a ETA for the list view of live cells tab?

devchenyan commented 6 months ago

@devchenyan can you provide a ETA for the list view of live cells tab?

5.10

zmcNotafraid commented 6 months ago
  • NFT:

@zmcNotafraid @rabbitz Hi mc, nan, We may need to add a Type label and a Block height label for the live cells api.

Also serial numbers should also be added to the list view. @devchenyan image

Current API was supported.For block_height in api is block_number, for type in api is extra_info's type

devchenyan commented 6 months ago

https://github.com/nervosnetwork/ckb-explorer-frontend/pull/1597