diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_use_capsules.md b/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_use_capsules.md index 15311ce830b8..fe6306115104 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_use_capsules.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_use_capsules.md @@ -12,8 +12,8 @@ Capsules provide per-contract non-volatile storage in the PXE. Data is stored lo ```rust use aztec::oracle::capsules; -// Inside a contract function, use context.this_address() for contract_address -let contract_address: AztecAddress = context.this_address(); +// Inside a contract function, use self.address for contract_address +let contract_address: AztecAddress = self.address(); let slot: Field = 1; // Store data at a slot (overwrites existing data) diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/globals.md b/docs/docs-developers/docs/aztec-nr/framework-description/globals.md index e73396ed206c..a940b617fe45 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/globals.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/globals.md @@ -23,7 +23,7 @@ The following fields are accessible via `context` methods: The unique identifier for the Aztec network instance (not the Ethereum chain the rollup settles to). ```rust -context.chain_id(); +self.context.chain_id(); ``` ### Version @@ -31,7 +31,7 @@ context.chain_id(); The Aztec protocol version number. The genesis block has version 1. ```rust -context.version(); +self.context.version(); ``` ### Gas Settings @@ -39,7 +39,7 @@ context.version(); The gas limits, max fees per gas, and inclusion fee set by the user for the transaction. ```rust -context.gas_settings(); +self.context.gas_settings(); ``` ## Public Global Variables @@ -59,7 +59,7 @@ Public functions have access to `chain_id()` and `version()` (same syntax as pri The unix timestamp when the block is executed. Provided by the block proposer, so it may have slight variance. Always increases monotonically. ```rust -context.timestamp(); +self.context.timestamp(); ``` ### Block Number @@ -67,7 +67,7 @@ context.timestamp(); The sequential block identifier. Genesis block is 1, incrementing by 1 for each subsequent block. ```rust -context.block_number(); +self.context.block_number(); ``` ### Gas Fees @@ -75,11 +75,11 @@ context.block_number(); The current L2 and DA gas prices for the block. You can access gas-related information via: ```rust -context.l2_gas_left(); // Remaining L2 gas -context.da_gas_left(); // Remaining DA gas -context.base_fee_per_l2_gas(); // L2 gas price -context.base_fee_per_da_gas(); // DA gas price -context.transaction_fee(); // Final tx fee (only available in teardown phase) +self.context.l2_gas_left(); // Remaining L2 gas +self.context.da_gas_left(); // Remaining DA gas +self.context.base_fee_per_l2_gas(); // L2 gas price +self.context.base_fee_per_da_gas(); // DA gas price +self.context.transaction_fee(); // Final tx fee (only available in teardown phase) ``` :::info Why do available globals differ between environments? diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/how_to_implement_custom_notes.md b/docs/docs-developers/docs/aztec-nr/framework-description/how_to_implement_custom_notes.md index 4b7113842e99..4e9802d0a368 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/how_to_implement_custom_notes.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/how_to_implement_custom_notes.md @@ -161,7 +161,7 @@ impl NoteHash for CustomHashNote { ) -> Field { // Standard nullifier using owner's nullifier secret key let owner_npk_m = aztec::keys::getters::get_public_keys(owner).npk_m; - let secret = context.request_nsk_app(owner_npk_m.hash()); + let secret = self.context.request_nsk_app(owner_npk_m.hash()); poseidon2_hash_with_separator( [note_hash_for_nullification, secret], DOM_SEP__NOTE_NULLIFIER, diff --git a/docs/docs-developers/docs/foundational-topics/advanced/authwit.md b/docs/docs-developers/docs/foundational-topics/advanced/authwit.md index a26b193a4acb..9f0a6e3a7a15 100644 --- a/docs/docs-developers/docs/foundational-topics/advanced/authwit.md +++ b/docs/docs-developers/docs/foundational-topics/advanced/authwit.md @@ -138,9 +138,9 @@ You can cancel an authwit before it's used by emitting its nullifier directly. T ```rust fn cancel_authwit(inner_hash: Field) { - let on_behalf_of = context.msg_sender(); + let on_behalf_of = self.msg_sender(); let nullifier = compute_authwit_nullifier(on_behalf_of, inner_hash); - context.push_nullifier(nullifier); + self.context.push_nullifier(nullifier); } ```