Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion crates/minibf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
[dependencies]
tracing.workspace = true
serde.workspace = true
tokio.workspace = true
tokio = { workspace = true, features = ["net"] }
tokio-util.workspace = true
pallas.workspace = true
tower = { workspace = true, features = ["util"] }
Expand Down
15 changes: 14 additions & 1 deletion crates/minibf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use axum::{
Router, ServiceExt,
};
use dolos_cardano::{
model::{AccountState, AssetState, DRepState, EpochState, FixedNamespace, PoolState},
model::{
AccountState, AssetState, DRepState, EpochState, FixedNamespace, PoolState, ProposalState,
},
ChainSummary, PParamsSet, StakeLog,
};
use pallas::{
Expand Down Expand Up @@ -349,6 +351,7 @@ where
Option<AssetState>: From<D::Entity>,
Option<EpochState>: From<D::Entity>,
Option<DRepState>: From<D::Entity>,
Option<ProposalState>: From<D::Entity>,
{
build_router_with_facade(Facade::<D> {
inner: domain,
Expand All @@ -365,6 +368,7 @@ where
Option<AssetState>: From<D::Entity>,
Option<EpochState>: From<D::Entity>,
Option<DRepState>: From<D::Entity>,
Option<ProposalState>: From<D::Entity>,
{
let permissive_cors = facade.config.permissive_cors();
let app = Router::new()
Expand Down Expand Up @@ -621,6 +625,14 @@ where
"/governance/proposals",
get(routes::governance::proposals::<D>),
)
.route(
"/governance/proposals/{tx_hash}/{cert_index}/metadata",
get(routes::governance::proposal_metadata::<D>),
)
.route(
"/governance/proposals/{gov_action_id}/metadata",
get(routes::governance::proposal_metadata_by_gov_action::<D>),
)
.with_state(facade)
.layer(
trace::TraceLayer::new_for_http()
Expand Down Expand Up @@ -664,6 +676,7 @@ where
Option<AssetState>: From<D::Entity>,
Option<EpochState>: From<D::Entity>,
Option<DRepState>: From<D::Entity>,
Option<ProposalState>: From<D::Entity>,
{
type Config = MinibfConfig;

Expand Down
Loading
Loading