Skip to content

Commit

Permalink
fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 29, 2024
1 parent 03ea518 commit b1010ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/docs/developers/contracts/syntax/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ The call context contains information about the current call being made:
- is_static_call: This will be set if and only if the current call is a static call. In a static call, state changing altering operations are not allowed.
- is_contract_deployment: This will be set if and only if the current call is the contract's constructor.

### Block Header
### Header

Another structure that is contained within the context is the Block Header object. This object is a special one as it contains all of the roots of Aztec's data trees.
Another structure that is contained within the context is the Header object.
In the private context this is a header of a block which used to generate proofs against.
In the public context this is a header of the block in which the transaction is to be included.

#include_code block-header /yarn-project/noir-protocol-circuits/src/crates/types/src/abis/header.nr rust
#include_code header /yarn-project/noir-protocol-circuits/src/crates/types/src/header.nr rust

:::info
The header can be of latest block only in the public context because only public transactions are being executed by the sequencer and therefore only public transactions can have this information.
:::

### Contract Deployment Data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ use crate::{
},
};

// docs:start:header
struct Header {
last_archive: AppendOnlyTreeSnapshot,
body_hash: [Field; NUM_FIELDS_PER_SHA256],
state: StateReference,
global_variables: GlobalVariables,
}
// docs:end:header

impl Header {

Expand Down

0 comments on commit b1010ae

Please sign in to comment.