Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(explorer): add operators and restakings #651

Merged
merged 261 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
27c30f1
fix: get_proofs_from_batch return value
uri-99 Jul 11, 2024
78d588e
feat(wip): load proofs separately
uri-99 Jul 11, 2024
0e31b85
feat(wip): start batch.cost_per_proof
uri-99 Jul 11, 2024
129cbed
fix(wip): add proofs in batch
glpecile Jul 11, 2024
38713cf
refactor: move map to function
glpecile Jul 11, 2024
946164d
feat: make proofs hidden behind load proofs button
glpecile Jul 11, 2024
5229cf3
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 11, 2024
6904c82
feat: add icon button and option to hide
glpecile Jul 11, 2024
9fbfc75
Merge branch '605-feat-show-proof-hashes-in-each-batch' into explorer…
glpecile Jul 11, 2024
497ee0e
refactor: add icon option on button core component
glpecile Jul 11, 2024
68114d9
feat(wip): cost_per_proof column
uri-99 Jul 11, 2024
4fc82f7
Merge branch 'explorer/598-feat-add-cost-per-proof-of-batch' of https…
uri-99 Jul 11, 2024
48a3ce1
feat: cost per proof done, in wei
uri-99 Jul 11, 2024
301c3aa
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 11, 2024
4ab32dc
fix: icon not being displayed
glpecile Jul 11, 2024
b27a2af
chore: rolled back --repetitions change
uri-99 Jul 12, 2024
20a379e
chore: rolled back --repetitions change
uri-99 Jul 12, 2024
d5de4ad
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 12, 2024
2e62d41
fix: unverified batches function arity error
glpecile Jul 12, 2024
140556d
feat: add eth to cost per proof
glpecile Jul 12, 2024
789b228
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 15, 2024
30ebda7
chore: rename add column to add table in ecto migrate
uri-99 Jul 15, 2024
eb15c63
fix: unmatched clause error
uri-99 Jul 15, 2024
47950f7
fix: handle get_proofs when none
uri-99 Jul 15, 2024
11240d3
fix: front for no proofs for batch
uri-99 Jul 15, 2024
724cef2
fix: border case of updating proofs in db
uri-99 Jul 15, 2024
4505643
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 15, 2024
aa6bc3d
feat: fix update of batches
uri-99 Jul 15, 2024
e26ce19
Merge branches '605-feat-show-proof-hashes-in-each-batch' and '605-fe…
uri-99 Jul 15, 2024
28fcd6c
Update explorer/lib/explorer_web/live/pages/batch/index.html.heex
uri-99 Jul 15, 2024
ba2d5cd
chore: detail on front
uri-99 Jul 15, 2024
14d4000
Merge branch '605-feat-show-proof-hashes-in-each-batch' into explorer…
glpecile Jul 15, 2024
88eb429
fix: {,} on process_unverified_batches
uri-99 Jul 15, 2024
f90fc30
chore: remove commented code
uri-99 Jul 15, 2024
f3b0db9
chore: delete comment
uri-99 Jul 15, 2024
7b9bbaf
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 15, 2024
38a69da
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 17, 2024
e62d060
Merge branch '605-feat-show-proof-hashes-in-each-batch' into explorer…
glpecile Jul 17, 2024
62e0c07
fix: merge error
glpecile Jul 17, 2024
1d0a95c
feat: add usd prices
glpecile Jul 17, 2024
1419198
build(deps): bump with mix deps.update --all
glpecile Jul 17, 2024
0f9f6e8
fix: add missing _ to variable
glpecile Jul 17, 2024
90f312a
Update explorer/lib/explorer_web/live/utils.ex
glpecile Jul 18, 2024
97299bb
Merge branch 'main' into 605-feat-show-proof-hashes-in-each-batch
glpecile Jul 19, 2024
e9e7bc8
Merge branch '605-feat-show-proof-hashes-in-each-batch' into explorer…
glpecile Jul 19, 2024
5d6eb5a
refactor: move count operators to avs_directory instead of index
glpecile Jul 19, 2024
83da205
Merge branch 'main' into explorer/598-feat-add-cost-per-proof-of-batch
glpecile Jul 19, 2024
4b4201d
feat(wip): creating tables
uri-99 Jul 19, 2024
76ed35f
feat(wip): add views for operator and assets
glpecile Jul 20, 2024
a352af6
fix: ecto migrate of create restakings table
uri-99 Jul 20, 2024
0606dd7
fix: add missing attribute def
glpecile Jul 20, 2024
e9af4ee
feat: make operators model
uri-99 Jul 20, 2024
b475309
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Jul 20, 2024
5cd7d90
feat: tokens and restakings models
uri-99 Jul 20, 2024
2db552c
fix: models
uri-99 Jul 20, 2024
d1cfdbc
refactor: move table to core components
glpecile Jul 23, 2024
1646b8e
feat[wip]: add mock table on all views
glpecile Jul 23, 2024
3f4640b
fix: remove duplicated code from merge
glpecile Jul 23, 2024
6d777f1
fit: add merkle_root to prevent fetching from socket
glpecile Jul 23, 2024
ff2a41d
feat: add global cache for eth usd prices
glpecile Jul 23, 2024
bb64bf9
Merge branch 'main' into explorer/598-feat-add-cost-per-proof-of-batch
glpecile Jul 23, 2024
a85d3e0
Merge branch 'refs/heads/explorer/598-feat-add-cost-per-proof-of-batc…
glpecile Jul 23, 2024
acc1193
fix: add _ to remove warning
glpecile Jul 23, 2024
ee43460
feat: add tootip component
glpecile Jul 25, 2024
f7fb69b
chore: update makefile
glpecile Jul 25, 2024
6ac6a1b
style: add animations to tooltip
glpecile Jul 25, 2024
196115b
fix: avoid quick flash of “Trying to reconnect”
glpecile Jul 25, 2024
105c09c
style(batches): add out animation on page change
glpecile Jul 25, 2024
1d804c7
fix: tweak entering animation on table
glpecile Jul 25, 2024
84f0efb
feat: insert operator data to DB
uri-99 Jul 26, 2024
a32c163
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Jul 26, 2024
205bba0
fix: ensure socket is connected before subscribing to pubsub in order…
glpecile Jul 26, 2024
e228a7a
feat: add URI to operator
uri-99 Jul 29, 2024
868d553
feat: fetch and save operator metadata
uri-99 Jul 29, 2024
0ffa891
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Jul 30, 2024
eccc6e4
feat: add operator name and logo to table
glpecile Jul 30, 2024
0073052
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Jul 30, 2024
e74248a
feat: add operator detail view
glpecile Jul 30, 2024
e3097e3
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Jul 30, 2024
1fbc65a
chore: remove warnings and small refactors
uri-99 Jul 30, 2024
0b5e948
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Jul 30, 2024
492e80a
chore: upgrade mix
uri-99 Jul 30, 2024
9f80af4
fix: remove decimals from tokens table
uri-99 Jul 30, 2024
07de268
style(operator-detail): color hierarchy
glpecile Jul 30, 2024
7fea833
feat: fetch old operators script
uri-99 Jul 31, 2024
c03e2e9
feat: operator is_active column
uri-99 Jul 31, 2024
7d108f4
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Jul 31, 2024
ffbe340
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Jul 31, 2024
2c9d586
feat: handle operator unregistration
uri-99 Jul 31, 2024
44de539
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Jul 31, 2024
9698f02
chore: mix.lock
uri-99 Jul 31, 2024
6dafb75
feat: is_active on front
uri-99 Jul 31, 2024
27525e7
feat: restakeable stratergies
uri-99 Jul 31, 2024
e69c11f
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 2, 2024
b9f19bb
feat: error handling in fetch restakeable strategies
uri-99 Aug 2, 2024
318347a
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 2, 2024
a76a2e1
fix: add docs to navbar
glpecile Aug 2, 2024
def7376
fix: replace latest batches for just batches
glpecile Aug 2, 2024
cc2d304
refactor: operators primary key is now address
uri-99 Aug 2, 2024
3770f7c
feat: start registry coordinator
uri-99 Aug 2, 2024
e9f2dd9
feat: start stake registrty
uri-99 Aug 2, 2024
a429552
refactor: delegation manager
uri-99 Aug 2, 2024
8fc8f43
feat: avs directory manager with operator id
uri-99 Aug 2, 2024
aeba15f
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 2, 2024
b1e3d63
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 5, 2024
78d4be7
refactor: move random_id function to utils
glpecile Aug 5, 2024
a68a8db
feat: add eigen operator url
glpecile Aug 5, 2024
9ec420a
style: use dynamic badge for operator status
glpecile Aug 5, 2024
69ac789
fix: replace merkle root for batch hash
glpecile Aug 5, 2024
480ca1b
style: change badge false state bg color
glpecile Aug 5, 2024
0b42104
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 5, 2024
87cda96
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 6, 2024
df47e25
feat: improvements on ecto migrates
uri-99 Aug 7, 2024
f59cbea
feat: add restakings ecto migrate
uri-99 Aug 7, 2024
08ed7c6
feat: add quorums and quorum_strategies ecto migrate
uri-99 Aug 7, 2024
7eb54b9
feat: stake_registry_manager and restakings model
uri-99 Aug 7, 2024
38a1848
feat: periodically now runs necessary info gathering processes
uri-99 Aug 7, 2024
40af693
fix: small bugs on contract managers
uri-99 Aug 7, 2024
0ba8566
refactor: style
uri-99 Aug 7, 2024
a8f58d9
feat: strategy_manager
uri-99 Aug 7, 2024
a43ec9d
feat: quorums model
uri-99 Aug 7, 2024
ae05993
fix: strategies model
uri-99 Aug 7, 2024
64fd480
feat: hex_string_to_int util
uri-99 Aug 7, 2024
a5ed7f2
fix: make explorer_fetch_old_operators
uri-99 Aug 7, 2024
921b939
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 7, 2024
7e42cac
feat: migration script
uri-99 Aug 7, 2024
3fa48db
feat: get_all_strategies
uri-99 Aug 7, 2024
e07ad3e
feat: get_aggregated_restakings
uri-99 Aug 7, 2024
c200b6a
feat: get restakes of operators
uri-99 Aug 7, 2024
06109ff
Merge remote-tracking branch 'refs/remotes/origin/main' into explorer…
glpecile Aug 7, 2024
fb8e7f4
fix(home): grid after merge
glpecile Aug 7, 2024
1da0c88
remove: make explorer_fetch_restakeable_strategies
uri-99 Aug 7, 2024
d6e22d0
fix: aggregated_restakings no longer an array
uri-99 Aug 7, 2024
200533d
feat(home): display restaked amount
glpecile Aug 7, 2024
e2b0c98
feat(operator-detail): add aggregated restake in eth
glpecile Aug 7, 2024
7e33569
feat: handling of native eth restaking
uri-99 Aug 8, 2024
2c40127
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 8, 2024
e085151
style: add arrow icon on internal links
glpecile Aug 8, 2024
b3e7a98
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
glpecile Aug 8, 2024
fb00364
chore: remove assets from nav
glpecile Aug 8, 2024
f3ac246
fix: selection text
glpecile Aug 8, 2024
ffe37ba
feat: operator has total_stake an restakings filled with each operato…
uri-99 Aug 10, 2024
05bb5a6
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 10, 2024
6da5d7a
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 12, 2024
5404948
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 12, 2024
5c6fe86
refactor: switch from npm to pnpm
glpecile Aug 12, 2024
758ab48
refactor: using operators.get total stake, and better prints
uri-99 Aug 12, 2024
373ad77
refactor: more info on get_restakes_by_operator_id
uri-99 Aug 12, 2024
7d8c30d
fix: eth restaked
glpecile Aug 12, 2024
554cd26
build(deps): bump tailwind version
glpecile Aug 12, 2024
50a16cc
fix: semantic html
glpecile Aug 12, 2024
8498868
feat: update strategies.total_stake on restaking update
uri-99 Aug 12, 2024
ebb7824
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 12, 2024
e62aac8
fix: order operator by stake
glpecile Aug 12, 2024
aa61e52
fix: use param instead of map
glpecile Aug 12, 2024
5272f05
feat(operators): add restaked details
glpecile Aug 12, 2024
ad2dd19
feat: get operator wiright
uri-99 Aug 12, 2024
69a51dd
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 12, 2024
66ca1eb
fix: compiler warnings
glpecile Aug 12, 2024
d847096
fix: table elements not showing
glpecile Aug 12, 2024
3cc85bf
fix: assets eth restaked
glpecile Aug 12, 2024
7c22c36
fix: comments, and call handle_quorum(0) on script
uri-99 Aug 13, 2024
df15cfb
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
5a8d104
fix: restakes in operator detail
glpecile Aug 13, 2024
358eb00
fix: add order to strategies
glpecile Aug 13, 2024
3e6f47b
fix: assets view
glpecile Aug 13, 2024
89eae5d
feat: add cta for operators and assets views
glpecile Aug 13, 2024
312446b
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 13, 2024
247f3e1
fix: improve cta tap target
glpecile Aug 13, 2024
60b63be
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
glpecile Aug 13, 2024
3e6939c
fix: restaking gathering bug
uri-99 Aug 13, 2024
dde1675
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
57125d4
fix: mix.lock
glpecile Aug 13, 2024
d876516
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
glpecile Aug 13, 2024
b10bd8c
refactor: rename assets to restakes
glpecile Aug 13, 2024
6eb9292
refactor: add _interface_ to token contract managers
uri-99 Aug 13, 2024
fe4a1c0
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
ecd717d
feat: add operator id and copy to clipboard
glpecile Aug 13, 2024
d39740c
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
glpecile Aug 13, 2024
796f372
feat: periodically process info from this pr
uri-99 Aug 13, 2024
53b5af9
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
glpecile Aug 13, 2024
70c54a7
feat: add restake detail view
glpecile Aug 13, 2024
f4da578
refactor: rename frontend utils to helpers avoiding confusion with ba…
glpecile Aug 13, 2024
ca861c1
fix: Utils.fetch_eigen_operator_metadata
uri-99 Aug 13, 2024
2887240
feat: add links to etherscan and eigen site
glpecile Aug 13, 2024
750295f
delete: strategyManager
uri-99 Aug 13, 2024
ca2e05d
chore: remove comments
uri-99 Aug 13, 2024
bda2590
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
931aaa3
feat: add numbers formatting for eth values
glpecile Aug 13, 2024
012e736
chore: polishing PR
uri-99 Aug 13, 2024
702c386
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
5b51512
chore: change and remove old comments
uri-99 Aug 13, 2024
fcaa4c2
feat: get_operators_with_their_weights
uri-99 Aug 13, 2024
f6cc509
fix: improve details ui
glpecile Aug 13, 2024
116a4a2
chore: remove dbg
uri-99 Aug 13, 2024
9f4a823
Merge branch 'explorer/597-feat-add-validator-screen' of https://gith…
uri-99 Aug 13, 2024
79213f7
fix: bug on has_operator_changed_staking, not taking into account ope…
uri-99 Aug 13, 2024
da81029
feat: add concentration %
glpecile Aug 13, 2024
43f43da
feat: add concentration in detail view
glpecile Aug 13, 2024
8a3eb19
feat: add live action updates
glpecile Aug 13, 2024
c96d3c5
fix: replace :ok for :no_reply in handle_info
glpecile Aug 13, 2024
9e4c9ae
fix: remove clipboard warn
glpecile Aug 14, 2024
408985c
fix: add nil handling in format_number
uri-99 Aug 15, 2024
4558377
fix(operator-detail): address mobile overflow
glpecile Aug 15, 2024
aaacfcc
feat: add hamburger menu for mobile
glpecile Aug 15, 2024
a41fce0
style: add animation to hamburger menu
glpecile Aug 15, 2024
ccdefff
fix: update periodically times to one
glpecile Aug 16, 2024
fcddf29
fix: add real time updates to cta component
glpecile Aug 16, 2024
9056d7b
fix: delete comment from review
glpecile Aug 19, 2024
c2581fc
fix: use update instead of handle info for live component
glpecile Aug 19, 2024
f406a65
fix: improve tooltip ui
glpecile Aug 19, 2024
fc5ce51
fix: add classes merge utility to existing class merge
glpecile Aug 19, 2024
723683e
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 19, 2024
22107ba
fix: add tooltip to open link on explorers
glpecile Aug 19, 2024
3ed0a89
fix: images not loading due to security policy
glpecile Aug 19, 2024
14b0309
feat: add restakes images
glpecile Aug 19, 2024
da93037
fix: add first block for holesky
glpecile Aug 19, 2024
b0f74c9
fix: add host to config
glpecile Aug 20, 2024
a4f9dfe
fix: use lowercase restakes image name
glpecile Aug 20, 2024
3da2871
fix: realtime updates to operators and restakings cta
glpecile Aug 20, 2024
351a56a
Delete explorer/priv/static/images/restakes/EIGEN.webp
glpecile Aug 20, 2024
2339c38
Delete explorer/priv/static/images/restakes/osETH.webp
glpecile Aug 20, 2024
9c40326
Delete explorer/priv/static/images/restakes/rETH.webp
glpecile Aug 20, 2024
06baa3d
Delete explorer/priv/static/images/restakes/reALT.webp
glpecile Aug 20, 2024
2fa1e7e
Delete explorer/priv/static/images/restakes/stETH.webp
glpecile Aug 20, 2024
94d713b
Delete explorer/priv/static/images/restakes/cbETH.webp
glpecile Aug 20, 2024
1ea2dfe
Delete explorer/priv/static/images/restakes/WETH.webp
glpecile Aug 20, 2024
61c0617
Delete explorer/priv/static/images/restakes/ETHx.webp
glpecile Aug 20, 2024
bbe3a13
Delete explorer/priv/static/images/restakes/ETH.webp
glpecile Aug 20, 2024
7bdb695
Delete explorer/priv/static/images/restakes/EO.webp
glpecile Aug 20, 2024
9ff86f5
Delete explorer/priv/static/images/restakes/mETH.webp
glpecile Aug 20, 2024
2e64c86
Delete explorer/priv/static/images/restakes/lsETH.webp
glpecile Aug 20, 2024
098723a
Delete explorer/priv/static/images/restakes/ankrETH.webp
glpecile Aug 20, 2024
5918a95
fix: make explorer_fetch_old_operators_strategies_restakes presets fr…
uri-99 Aug 21, 2024
e57d209
Merge remote-tracking branch 'refs/remotes/origin/main' into explorer…
glpecile Aug 21, 2024
2679d51
chore: format in periodically.ex
uri-99 Aug 21, 2024
cbd56f9
Update explorer/lib/explorer/contract_managers/aligned_layer_service_…
entropidelic Aug 22, 2024
a113f2a
Update explorer/lib/explorer/contract_managers/aligned_layer_service_…
entropidelic Aug 22, 2024
db0dfdd
Update explorer/lib/explorer/contract_managers/stake_registry_manager.ex
entropidelic Aug 22, 2024
d89ecea
fix(explorer): accept cbor encoding from s3 data (#839)
uri-99 Aug 22, 2024
96595a7
Merge branch 'main' into explorer/597-feat-add-validator-screen
glpecile Aug 22, 2024
3b66e6f
fix: replace restakes url for restake and add active operators discla…
glpecile Aug 22, 2024
825306d
Merge branch 'main' into explorer/597-feat-add-validator-screen
uri-99 Aug 23, 2024
0566a8e
Update anvil state
entropidelic Aug 23, 2024
c1ee14e
chore: commit anvil state
uri-99 Aug 23, 2024
1d8999b
fix: to string batcher sender address
glpecile Aug 23, 2024
6798af1
Merge remote-tracking branch 'origin/main' into explorer/597-feat-add…
glpecile Aug 23, 2024
dbb0ce1
fix: deployment output
glpecile Aug 23, 2024
7c43e03
fix: nit
glpecile Aug 23, 2024
2a63c37
chore: deploy anvil
uri-99 Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,9 @@ build_all_ffi_linux: ## Build all FFIs for Linux


__EXPLORER__:
run_devnet_explorer: run_db ecto_setup_db
@cd explorer/ && \
mix setup && \
cp .env.dev .env && \
./start.sh

run_explorer: run_db ecto_setup_db
@cd explorer/ && \
pnpm install --prefix assets && \
mix setup && \
./start.sh

Expand Down Expand Up @@ -663,3 +658,7 @@ recover_db: run_db
explorer_fetch_old_batches:
@cd explorer && \
./scripts/fetch_old_batches.sh 1728056 1729806

explorer_fetch_old_operators_strategies_restakes:
@cd explorer && \
./scripts/fetch_old_operators_strategies_restakes.sh 0
12 changes: 12 additions & 0 deletions explorer/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,15 @@
--ring: 168.51 79.66% 23.14%;
}
}

@layer components {
.tooltip {
display: none;
}

.tooltip[data-show] {
position: absolute;
display: block;
z-index: 9999;
}
}
2 changes: 2 additions & 0 deletions explorer/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import topbar from "../vendor/topbar";

import darkModeHook from "../vendor/dark_mode";
import searchFocusHook from "../vendor/search_focus";
import tooltipHook from "../vendor/tooltip";
import copyToClipboardHook from "../vendor/clipboard";

let Hooks = {};
Hooks.DarkThemeToggle = darkModeHook;
Hooks.SearchFocus = searchFocusHook;
Hooks.TooltipHook = tooltipHook;
Hooks.CopyToClipboard = copyToClipboardHook;

let csrfToken = document
Expand Down
9 changes: 9 additions & 0 deletions explorer/assets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"@floating-ui/dom": "^1.6.8"
},
"devDependencies": {
"tailwindcss-animate": "^1.0.7"
},
"packageManager": "[email protected]"
}
48 changes: 48 additions & 0 deletions explorer/assets/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions explorer/assets/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module.exports = {
}
},
plugins: [
require("tailwindcss-animate"),
require("@tailwindcss/forms"),
// Allows prefixing tailwind classes with LiveView classes to add rules
// only when LiveView classes are applied, for example:
Expand Down
90 changes: 90 additions & 0 deletions explorer/assets/vendor/tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import {
computePosition,
autoUpdate,
offset,
shift,
flip
} from "@floating-ui/dom";

// A class to manage the tooltip lifecycle
class Tooltip {
showEvents = ["mouseenter", "focus"];
hideEvents = ["mouseleave", "blur"];
$parent;
$tooltip;
cleanup;

constructor($tooltip) {
this.$tooltip = $tooltip;
this.$parent = $tooltip.parentElement;
this.cleanup = null;
this.setupEventListeners();
this.setupFloatingUI();
}

setupEventListeners() {
this.showEvents.forEach((event) => {
this.$parent.addEventListener(
event,
this.show.bind(this)
);
});

this.hideEvents.forEach((event) => {
this.$parent.addEventListener(
event,
this.hide.bind(this)
);
});
}

setupFloatingUI() {
this.cleanup = autoUpdate(this.$parent, this.$tooltip, () => {
computePosition(this.$parent, this.$tooltip, {
placement: "top",
middleware: [offset(5), flip(), shift({ padding: 5 })]
}).then(({ x, y }) => {
Object.assign(this.$tooltip.style, {
left: `${x}px`,
top: `${y}px`
});
});
});
}

show() {
this.$tooltip.setAttribute("data-show", "");
}

hide() {
this.$tooltip.removeAttribute("data-show");
}

destroy() {
this.showEvents.forEach((event) => {
this.$parent.removeEventListener(event, this.show);
});

this.hideEvents.forEach((event) => {
this.$parent.removeEventListener(event, this.hide);
});

if (this.cleanup) {
this.cleanup();
}
}
}

const tooltipHook = {
mounted() {
this.el.tooltip = new Tooltip(this.el);
},
updated() {
this.el.tooltip?.update();
},
destroyed() {
this.el.tooltip?.destroy();
}
};

export default tooltipHook;
29 changes: 27 additions & 2 deletions explorer/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import Config
config :explorer,
generators: [timestamp_type: :utc_datetime]

host = System.get_env("PHX_HOST") || "localhost"

# Configures the endpoint
config :explorer, ExplorerWeb.Endpoint,
url: [host: "localhost"],
url: [host: host],
adapter: Bandit.PhoenixAdapter,
render_errors: [
formats: [html: ExplorerWeb.ErrorHTML, json: ExplorerWeb.ErrorJSON],
Expand All @@ -38,7 +40,7 @@ config :esbuild,

# Configure tailwind (the version is required)
config :tailwind,
version: "3.4.0",
version: "3.4.9",
explorer: [
args: ~w(
--config=tailwind.config.js
Expand All @@ -48,6 +50,29 @@ config :tailwind,
cd: Path.expand("../assets", __DIR__)
]

config :tails, :color_classes, [
"primary",
"secondary",
"accent",
"destructive",
"muted",
"popover",
"card",
"border",
"input",
"foreground",
"muted-foreground",
"popover-foreground",
"card-foreground",
"primary-foreground",
"secondary-foreground",
"accent-foreground",
"destructive-foreground",
"ring",
"radius",
"tooltip"
]

# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
Expand Down
1 change: 1 addition & 0 deletions explorer/lib/abi/DelegationManager.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions explorer/lib/abi/IERC20Metadata.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions explorer/lib/abi/IRegistryCoordinator.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions explorer/lib/abi/IStrategy.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions explorer/lib/abi/StakeRegistry.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions explorer/lib/explorer/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ defmodule Explorer.Application do
ExplorerWeb.Endpoint
]

# Start the periodic task, with its own supervisor and mutex
# Start the main supervisor
opts = [strategy: :one_for_one, name: Explorer.Supervisor]
Supervisor.start_link(children, opts)

# Start the periodic task, with its own supervisor and mutex
periodic_children = [
{Explorer.Periodically, []},
{Mutex, name: BatchMutex, meta: "Used to prevent concurrent downloads"}
Supervisor.child_spec({Mutex, [name: BatchMutex, meta: "Used to prevent concurrent downloads"]}, id: :batch_mutex),
Supervisor.child_spec({Mutex, [name: OperatorMutex, meta: "Used to prevent concurrent operator processing"]}, id: :operator_mutex)
]

periodic_opts = [strategy: :one_for_all, name: Explorer.Periodically.Supervisor]
Expand Down
43 changes: 0 additions & 43 deletions explorer/lib/explorer/avs_directory.ex

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,14 @@ defmodule AlignedLayerServiceManager do
:error -> raise("Error parsing @gas_per_proof")
end
end

def update_restakeable_strategies() do
case AlignedLayerServiceManager.get_restakeable_strategies() |> Ethers.call() do
{:ok, restakeable_strategies} ->
Strategies.update(restakeable_strategies)
{:error, error} ->
dbg("Error fetching restakeable strategies: #{error}")
raise("Error fetching restakeable strategies: #{error}")
end
end
end
Loading
Loading