dusk-network / rusk

The reference Dusk platform implementation and tools
Mozilla Public License 2.0
165 stars 60 forks source link

explorer: Add Address and Transaction Information #2704

Open nortonandreev opened 1 month ago

nortonandreev commented 1 month ago

Description

It has been suggested that the Explorer should contain detailed information about addresses and their associated transactions. With the introduction of Moonlight (which is fully public), this functionality should now be possible.

Expected Functionality

Considerations

Tasks

  1. Research which Etherscan features are relevant for our Explorer.
  2. Confirm data retrieval is possible through an appropriate API (such as the w3sper SDK).
  3. Design and propose the layout for these features in our Explorer.
  4. Implement and test the new Explorer functionality.

References

deuch13 commented 1 month ago

With the current state of the moonlight history feature querying the endpoint returns an array of objects containing the events found on a block. In the way the information is presented we can only display the block height where the transaction occurred, the type of transaction and the transaction hash. The rest of the information is being returned as bytes in the data property.

Another limitation is that we will have to make two API queries, one for the outbound events and another for the inbound events, which will make displaying the information difficult as the user will not be able to see both inbound and outbound events on the same table.

At this time neither testnet.nodes.dusk.network or devnet.nodes.dusk.network have this feature enabled.

Here is an example of a block returned by the endpoint:


{
"block_height": 19071,
 "events": [
   {
     "data": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e27ba14d672c50a57c493b3774a91211aae4ba7167bac9a145f94dca09b901717b11a8819299536c30f67506e60b2d02990cc165d9bb0b42eaa709cc41fa5c68af1996eee799d949561cfdd24aaf12ef61b535fae5c3a17097733febbf47d2087d673efdf7d3cf7404c0a28300d373c820d6f3169db6609dd54536088585a3ca425a9dec41fb79a5240fb2ec603c170132e8c0497f39556f0d59fa3273c8fed4c0a1f688a310c80122e1789aae4cda7b86a3fccc69a8f469b33b374bd8e2f5140000000000000000000000000000000088fdffff00000000007ddaac00000000",
     "target": "0100000000000000000000000000000000000000000000000000000000000000",
     "topic": "moonlight"
  }],
"origin": "12ace1c345d4677048ac8b0b46fe644d4ea312c66a06b48d9dce8f668a370620"
}
deuch13 commented 1 month ago

After a discussion with @Neotamandua we agreed, as a temporary measure, to create another endpoint which will have all known events byte data deserialized.