walnuthq / op-scan

Lightweight transaction explorer for the OP Stack.
7 stars 16 forks source link

Added "To:" and "From:" along with checks of EOA to EOA or contract interaction #17

Open PoulavBhowmick03 opened 1 week ago

PoulavBhowmick03 commented 1 week ago

Addresses #14 Closes #14

This is how the tx/[hash].tsx looks like now, after the changes image

Changes made

  1. Added a useState to check if the "to" address is a contract or not
  2. The component conditionally renders "Contract Interaction" or "EOA Transfer" based on the state.
  3. Both from and to addresses are rendered as links to their respective account detail pages.

This is how I have implemented the changes to this. Let me know if this is good enough or there has to be any other changes made

PoulavBhowmick03 commented 6 days ago

Okay! Will make these changes

PoulavBhowmick03 commented 6 days ago

@saimeunt Can you check the changes that I made, moved the isContractInteraction to lib/types.ts

saimeunt commented 1 day ago

@PoulavBhowmick03 Hey do you plan to finish this before the end of the hack? Shouldn't be too hard to get this done quickly.