Skip to content

Commit

Permalink
chore: add helper for loading custom trusted setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Dec 10, 2024
1 parent 0d4476a commit e67da76
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/eips/src/eip4844/env_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ impl EnvKzgSettings {
Self::Custom(settings) => settings,
}
}

/// Load custom KZG settings from a trusted setup file.
#[cfg(feature = "std")]
pub fn load_from_trusted_setup_file(trusted_setup_file: &std::path::Path) -> Result<Self, c_kzg::Error> {
let settings = KzgSettings::load_trusted_setup_file(trusted_setup_file)?;
Ok(Self::Custom(Arc::new(settings)))
}
}

0 comments on commit e67da76

Please sign in to comment.