Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Hackathon/more layouts #535

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Hackathon/more layouts #535

merged 1 commit into from
Jun 21, 2023

Conversation

alfetopito
Copy link
Collaborator

Summary

Add 2 new layouts:

  • circle
  • concentric
image

@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
explorer-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback

📖 Storybook ↗︎

@alfetopito alfetopito changed the base branch from develop to hackaton-graph June 21, 2023 09:57
@elena-zh
Copy link

Hey @alfetopito , is this OK that a default layout (grid) does not look good here?
grid

then, klay is also affected
klay

and a new one (concentric) also does not look nice
concentric

Tested using this TX details 0xd78b614d0d5c39d55c516653e8674b73133d2c9bbdf302e5be036de7c6b304e6

And sorry for testing this :)

@alfetopito
Copy link
Collaborator Author

Hey @alfetopito , is this OK that a default layout (grid) does not look good here?
And sorry for testing this :)

Nooooo not ready yet XD

But yeah, the first 2 layouts will in complex cases look terrible, that's why these 2 new layouts are being added and at least one of them should make it look good 🤞

Try for example with 0x1de93f67637cd6949f1cae26e952fc390d3170e895705ca40528a722c106eb8a and 0x54450bc55a83276344a4e27b951a82d0d5e1927af0126aaac64b1417eb369868

@alfetopito alfetopito merged commit 958525e into hackaton-graph Jun 21, 2023
@alfetopito alfetopito deleted the hackathon/more-layouts branch June 21, 2023 10:40
@elena-zh
Copy link

Thanks!!
For now, FCoSE layout looks best for me for all transactions that I open.
Also, for those TXs where lots of nodes (0x54450bc55a83276344a4e27b951a82d0d5e1927af0126aaac64b1417eb369868), I see loading cow each 30 sec. I mean, the layout appears, then loading cow appears again and again each 30 sec
image

@alfetopito
Copy link
Collaborator Author

Thanks!! For now, FCoSE layout looks best for me for all transactions that I open. Also, for those TXs where lots of nodes (0x54450bc55a83276344a4e27b951a82d0d5e1927af0126aaac64b1417eb369868), I see loading cow each 30 sec. I mean, the layout appears, then loading cow appears again and again each 30 sec image

I'm finalizing the base PR with all the changes where it's ready.
Will tag QA when I'm done then you can test the final version :)

alfetopito added a commit that referenced this pull request Jun 28, 2023
* Hackaton/tenderly data loading (#530)

* chore: add getTransactionTrace and getTransactionContracts tenderly api fns

* chore: add hook to fetch unfiltered tx data

* Hackaton/nodes and edges (#531)

* refactor: rename `traceToTransfersAndTrades`

* chore: export all types from tenderly from index

* feat: add getContractTrades

* feat: add getNotesAndEdges

* fix: use buyToken address as a key for the buyToken address

* Hackaton/update graph (#532)

* refactor: a tiny bit of clean up on useTxBatchTrades

* chore: update graph

WIP

Messy commit, lots to describe and update still

* fix: edge colors now match user/amm interactions

* chore: pass down transfers to Node objs

* chore: use different node types for dex vs token nodes

* chore: use a different icon for token nodes

* chore: capture eth sell transfers

* refactor: remove repeated variable

* chore: add map of wrapped native token addresses

* chore: add link to hyper nodes

* chore: show address and link when token has no symbol

* chore: actually, always show link for all nodes

* chore: improve edge labels

* chore: add tooltip to edges

* chore: replace native token node with wrapped

* ore: add node type hyper

* chore: add dynamic stylesheet for token images

* chore: add token images to graph

* filter contract trades which only route tokens (#533)

---------

Co-authored-by: Felix Henneke <[email protected]>

* chore: add circle and concentric layouts (#535)

* Hackathon/integrate both visualizations (#537)

* refactor: rename const to all caps

* chore: wire up everything -- still WIP

* chore: more a ton of refactorings, still not working

* fix: enum comparison of same type was failing because one was a string the other a number

* chore: update layout once visualization changes

* fix: use proper type

* chore: remove debug statements

* refactor: remove unused hooks

* refactor: move buildContractBasedSettlement to TransactionBatchGraph

* refactor: move buildTokenBasedSettlement into settlementBuilder

* refactor: move node builder fns into nodesBuilder file

* refactor: move types to types file

* refactor: move hooks to hooks file

* chore: cache tenderly fetched data

* refactor: rename contract->transfer token->trades

* Merge edges for hypernodes + node tooltips (#536)

* added tooltip for nodes showing balance of token

* show dangeling edges

* merge transfers for hyper nodes

* use order information to filter for non-user trades

* clean up

address comments
- made isInternal in Transfer optional
- better sign for 0 in tool tip
- tooltip can be undefined. does still render stuff though.

* refactor: remove empty folder/file

* fix: do not create tooltip if it doesn't exist

* fix: adjust tooltip header width

* refactor: simplify styles

* fix: improve grid layout for trade based view

* fix: always use bezier style edges for trade based view

* refactor: simplify styles further

* chore: make concentric layout further spread out

* refactor: sort imports

* chore: load tokens which are not part of any order

* chore: start simple graphs in grid layout

* fix: reset zoom when visualization change and keep same layout

* fix: change filter logic from !== 1 to > 1

* fix: add dangling nodes back

* fix: add padding on top of graph to not overlap buttons

---------

Co-authored-by: Felix Henneke <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants