openzeppelin_relayer/models/
plugin.rs

1use std::time::Duration;
2
3use serde::{Deserialize, Serialize};
4use utoipa::ToSchema;
5
6#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
7pub struct PluginModel {
8    /// Plugin ID
9    pub id: String,
10    /// Plugin path
11    pub path: String,
12    /// Plugin timeout
13    #[schema(value_type = u64)]
14    pub timeout: Duration,
15    /// Whether to include logs in the HTTP response
16    #[serde(default)]
17    pub emit_logs: bool,
18    /// Whether to include traces in the HTTP response
19    #[serde(default)]
20    pub emit_traces: bool,
21}
22
23#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
24pub struct PluginCallRequest {
25    /// Plugin parameters
26    pub params: serde_json::Value,
27}