Skip to content

Commit

Permalink
Bypass battery stations contracts call filter for court, parimutuel, …
Browse files Browse the repository at this point in the history
…order book markets (#1185)

update contracts call filter
  • Loading branch information
Chralt98 authored Nov 13, 2023
1 parent 30beab9 commit 258d163
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions runtime/battery-station/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,24 @@ impl Contains<RuntimeCall> for ContractsCallfilter {
deploy_swap_pool_and_additional_liquidity { .. } => true,
deploy_swap_pool_for_market { .. } => true,
dispute { .. } => true,
// Only allow CPMM markets using Authorized or SimpleDisputes dispute mechanism
// Only allow CPMM markets using Authorized or Court dispute mechanism
create_market {
dispute_mechanism: Some(MarketDisputeMechanism::Authorized),
dispute_mechanism:
Some(MarketDisputeMechanism::Authorized)
| Some(MarketDisputeMechanism::Court),
scoring_rule: ScoringRule::CPMM,
..
} => true,
create_cpmm_market_and_deploy_assets {
dispute_mechanism: Some(MarketDisputeMechanism::Authorized),
dispute_mechanism:
Some(MarketDisputeMechanism::Authorized)
| Some(MarketDisputeMechanism::Court),
..
} => true,
edit_market {
dispute_mechanism: Some(MarketDisputeMechanism::Authorized),
dispute_mechanism:
Some(MarketDisputeMechanism::Authorized)
| Some(MarketDisputeMechanism::Court),
scoring_rule: ScoringRule::CPMM,
..
} => true,
Expand All @@ -160,6 +166,8 @@ impl Contains<RuntimeCall> for ContractsCallfilter {
swap_exact_amount_out { .. } => true,
_ => false,
},
RuntimeCall::Orderbook(_) => true,
RuntimeCall::Parimutuel(_) => true,
_ => false,
}
}
Expand Down

0 comments on commit 258d163

Please sign in to comment.