foundry_config/bind_json.rs
1use crate::filter::GlobMatcher;
2use serde::{Deserialize, Serialize};
3use std::path::PathBuf;
4
5/// Contains the config for `forge bind-json`
6#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
7pub struct BindJsonConfig {
8 /// Path for the generated bindings file.
9 pub out: PathBuf,
10 /// Globs to include.
11 ///
12 /// If provided, only the files matching the globs will be included. Otherwise, defaults to
13 /// including all project files.
14 pub include: Vec<GlobMatcher>,
15 /// Globs to ignore
16 pub exclude: Vec<GlobMatcher>,
17}
18
19impl Default for BindJsonConfig {
20 fn default() -> Self {
21 Self {
22 out: PathBuf::from("utils/JsonBindings.sol"),
23 exclude: Vec::new(),
24 include: Vec::new(),
25 }
26 }
27}