File tree Expand file tree Collapse file tree
explorer/lib/explorer_web Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ defmodule ExplorerWeb.AggProofsTable do
2929
3030 <: col :let = { proof } label = "Blob versioned hash " class = "text-left " >
3131 < . a href = {
32- "#{ Helpers . get_etherescan_url ( ) } /blob/#{ proof . blob_versioned_hash } " }
32+ "#{ Helpers . get_blobscan_url ( ) } /blob/#{ proof . blob_versioned_hash } " }
3333 class = "inline-flex gap-x-3 items-center group-hover:text-foreground/80 no-underline font-normal "
3434 >
3535 < span class = "inline-flex gap-x-3 items-center group-hover:text-foreground/80 " >
Original file line number Diff line number Diff line change 9999 < . a
100100 target = "_blank "
101101 rel = "noopener "
102- href = { "#{ Helpers . get_etherescan_url ( ) } /blob/#{ @ agg_proof . blob_versioned_hash } " }
102+ href = { "#{ Helpers . get_blobscan_url ( ) } /blob/#{ @ agg_proof . blob_versioned_hash } " }
103103 class = "hover:text-foreground/80 "
104104 >
105105 <%= @ agg_proof . blob_versioned_hash %>
Original file line number Diff line number Diff line change @@ -155,6 +155,22 @@ defmodule ExplorerWeb.Helpers do
155155 end
156156 end
157157
158+ @ doc """
159+ Get the Etherscan URL based on the environment.
160+ - `holesky` -> https://holesky.etherscan.io
161+ - `mainnet` -> https://etherscan.io
162+ - `default` -> http://localhost:4000
163+ """
164+ def get_blobscan_url ( ) do
165+ prefix = System . get_env ( "ENVIRONMENT" )
166+
167+ case prefix do
168+ "mainnet" -> "https://blobscan.com/"
169+ "holesky" -> "https://holesky.blobscan.com/"
170+ _ -> "http://localhost:4000"
171+ end
172+ end
173+
158174 def get_aligned_contracts_addresses ( ) do
159175 Map . merge ( get_batcher_service_addresses ( ) , get_proof_aggregation_addresses ( ) )
160176 end
You can’t perform that action at this time.
0 commit comments