Skip to content

Commit 63583ea

Browse files
committed
docs: Improved doc comments
1 parent f101241 commit 63583ea

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

compiler/noirc_driver/src/contract.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ pub struct CompiledContract {
3535
pub functions: Vec<ContractFunction>,
3636

3737
/// All the events defined inside the contract scope.
38+
/// An event is a struct value that can be emitted via oracles
39+
/// by any contract function during execution.
3840
pub events: Vec<ContractEvent>,
3941

4042
pub file_map: BTreeMap<FileId, DebugFile>,

compiler/noirc_frontend/src/hir/def_map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub struct ContractFunctionMeta {
248248
pub is_entry_point: bool,
249249
}
250250

251-
/// A 'contract' in Noir source code with the given name and functions.
251+
/// A 'contract' in Noir source code with a given name, functions and events.
252252
/// This is not an AST node, it is just a convenient form to return for CrateDefMap::get_all_contracts.
253253
pub struct Contract {
254254
/// To keep `name` semi-unique, it is prefixed with the names of parent modules via CrateDefMap::get_module_path

0 commit comments

Comments
 (0)