Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/apps/explorer_web/lib/phoenix/param.ex

26 lines
495 B

alias Explorer.Chain.{Address, Block, Hash, Transaction}
defimpl Phoenix.Param, for: Address do
def to_param(%@for{hash: hash}) do
@protocol.to_param(hash)
end
end
defimpl Phoenix.Param, for: Block do
def to_param(%@for{number: number}) do
to_string(number)
end
end
defimpl Phoenix.Param, for: Hash do
def to_param(hash) do
to_string(hash)
end
end
defimpl Phoenix.Param, for: Transaction do
def to_param(%@for{hash: hash}) do
@protocol.to_param(hash)
end
end