|
|
@ -18,6 +18,13 @@ defmodule BlockScoutWeb.Router do |
|
|
|
plug(:accepts, ["json"]) |
|
|
|
plug(:accepts, ["json"]) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pipeline :contract_verification do |
|
|
|
|
|
|
|
plug(:accepts, ["html"]) |
|
|
|
|
|
|
|
plug(:fetch_session) |
|
|
|
|
|
|
|
plug(:fetch_flash) |
|
|
|
|
|
|
|
plug(BlockScoutWeb.CSPHeader) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
scope "/api/v1", BlockScoutWeb.API.V1, as: :api_v1 do |
|
|
|
scope "/api/v1", BlockScoutWeb.API.V1, as: :api_v1 do |
|
|
|
pipe_through(:api) |
|
|
|
pipe_through(:api) |
|
|
|
|
|
|
|
|
|
|
@ -29,6 +36,12 @@ defmodule BlockScoutWeb.Router do |
|
|
|
resources("/verified_smart_contracts", VerifiedSmartContractController, only: [:create]) |
|
|
|
resources("/verified_smart_contracts", VerifiedSmartContractController, only: [:create]) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scope "/verify_smart_contract" do |
|
|
|
|
|
|
|
pipe_through(:contract_verification) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
post("/contract_verifications", BlockScoutWeb.AddressContractVerificationController, :create) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
scope "/api", BlockScoutWeb.API.RPC do |
|
|
|
scope "/api", BlockScoutWeb.API.RPC do |
|
|
|
pipe_through(:api) |
|
|
|
pipe_through(:api) |
|
|
|
|
|
|
|
|
|
|
@ -165,8 +178,6 @@ defmodule BlockScoutWeb.Router do |
|
|
|
as: :verify_contract |
|
|
|
as: :verify_contract |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
get("/contract_verifications", AddressContractVerificationController, :create) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resources( |
|
|
|
resources( |
|
|
|
"/read_contract", |
|
|
|
"/read_contract", |
|
|
|
AddressReadContractController, |
|
|
|
AddressReadContractController, |
|
|
|