You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/contracts/syntax/functions.md
-1
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,6 @@ Oracles introduce **non-determinism** into a circuit, and thus are `unconstraine
111
111
112
112
### A few useful inbuilt oracles
113
113
114
-
-[`compute_selector`](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec-nr/aztec/src/selector.nr) - Computes the selector of a function. This is useful for when you want to call a function from within a circuit, but don't have an interface at hand and don't want to hardcode the selector in hex.
115
114
-[`debug_log`](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec-nr/aztec/src/oracle/debug_log.nr) - Provides a couple of debug functions that can be used to log information to the console.
116
115
-[`auth_witness`](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec-nr/authwit/src/auth_witness.nr) - Provides a way to fetch the authentication witness for a given address. This is useful when building account contracts to support approve-like functionality.
117
116
-[`get_l1_to_l2_message`](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec-nr/aztec/src/oracle/get_l1_to_l2_message.nr) - Useful for application that receive messages from L1 to be consumed on L2, such as token bridges or other cross-chain applications.
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/tutorials/writing_private_voting_contract.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ We are using various utils within the Aztec library:
71
71
72
72
*`context` - exposes things such as the contract address, msg_sender, etc
73
73
*`oracle::get_secret_key` - get your secret key to help us create a randomized nullifier
74
-
*`selector::compute_selector` - compute a function selector so we can call functions from other functions
74
+
*`FunctionSelector::from_signature` - compute a function selector from signature so we can call functions from other functions
75
75
*`state_vars::{ map::Map, public_state::PublicState, }` - we will use a Map to store the votes (key = voteId, value = number of votes), and PublicState to hold our public values that we mentioned earlier
76
76
*`types::type_serialization::{..}` - various serialization methods for defining how to use these types
77
77
*`types::address::{AztecAddress},` - our admin will be held as an address
@@ -113,7 +113,7 @@ Therefore our constructor must call a public function by using `context.call_pub
113
113
114
114
`context.call_public_function()` takes three arguments:
115
115
1. The contract address whose method we want to call
116
-
2. The selector of the function to call (we can use `compute_selector()` for this)
116
+
2. The selector of the function to call (we can use `FunctionSelector::from_signature(...)` for this)
117
117
3. The arguments of the function (we pass the `admin`)
118
118
119
119
We now need to write the `_initialize()` function:
0 commit comments