Skip to content

Commit

Permalink
chore: redo typo PR by omahs (noir-lang#5487)
Browse files Browse the repository at this point in the history
Thanks omahs for noir-lang#5486. Our policy
is to redo typo changes to dissuade metric farming. This is an automated
script.
  • Loading branch information
TomAFrench authored Jul 11, 2024
1 parent 89642c2 commit 90b636e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/docs/explainers/explainer-oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In short, anything that can be constrained in a Noir program but needs to be fet

Just like in The Matrix, Oracles are powerful. But with great power, comes great responsibility. Just because you're using them in a Noir program doesn't mean they're true. Noir has no superpowers. If you want to prove that Portugal won the Euro Cup 2016, you're still relying on potentially untrusted information.

To give a concrete example, Alice wants to login to the [NounsDAO](https://nouns.wtf/) forum with her username "noir_nouner" by proving she owns a noun without revealing her ethereum address. Her Noir program could have a oracle call like this:
To give a concrete example, Alice wants to login to the [NounsDAO](https://nouns.wtf/) forum with her username "noir_nouner" by proving she owns a noun without revealing her ethereum address. Her Noir program could have an oracle call like this:

```rust
#[oracle(getNoun)]
Expand All @@ -52,6 +52,6 @@ If you don't constrain the return of your oracle, you could be clearly opening a

On CLI, Nargo resolves oracles by making JSON RPC calls, which means it would require an RPC node to be running.

In JavaScript, NoirJS accepts and resolves arbitrary call handlers (that is, not limited to JSON) as long as they matches the expected types the developer defines. Refer to [Foreign Call Handler](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) to learn more about NoirJS's call handling.
In JavaScript, NoirJS accepts and resolves arbitrary call handlers (that is, not limited to JSON) as long as they match the expected types the developer defines. Refer to [Foreign Call Handler](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) to learn more about NoirJS's call handling.

If you want to build using oracles, follow through to the [oracle guide](../how_to/how-to-oracles.md) for a simple example on how to do that.
4 changes: 2 additions & 2 deletions docs/docs/how_to/how-to-oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ unconstrained fn get_sqrt(number: Field) -> Field {
}
```

In this example, we're wrapping our oracle function in a unconstrained method, and decorating it with `oracle(getSqrt)`. We can then call the unconstrained function as we would call any other function:
In this example, we're wrapping our oracle function in an unconstrained method, and decorating it with `oracle(getSqrt)`. We can then call the unconstrained function as we would call any other function:

```rust
fn main(input: Field) {
Expand Down Expand Up @@ -234,7 +234,7 @@ const client = new JSONRPCClient((jsonRPCRequest) => {
// declaring a function that takes the name of the foreign call (getSqrt) and the inputs
const foreignCallHandler = async (name, input) => {
// notice that the "inputs" parameter contains *all* the inputs
// in this case we to make the RPC request with the first parameter "numbers", which would be input[0]
// in this case we make the RPC request with the first parameter "numbers", which would be input[0]
const oracleReturn = await client.request(name, [
input[0].map((i) => i.toString("hex")),
]);
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/how_to/how-to-recursion.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In a standard recursive app, you're also dealing with at least two circuits. For
- `main`: a circuit of type `assert(x != y)`, where `main` is marked with a `#[recursive]` attribute. This attribute states that the backend should generate proofs that are friendly for verification within another circuit.
- `recursive`: a circuit that verifies `main`

For a full example on how recursive proofs work, please refer to the [noir-examples](https://github.com/noir-lang/noir-examples) repository. We will *not* be using it as a reference for this guide.
For a full example of how recursive proofs work, please refer to the [noir-examples](https://github.com/noir-lang/noir-examples) repository. We will *not* be using it as a reference for this guide.

## Step 1: Setup

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/how_to/how-to-solidity-verifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Generating a Solidity Verifier contract is actually a one-command process. Howev

## Step 1 - Generate a contract

This is by far the most straight-forward step. Just run:
This is by far the most straightforward step. Just run:

```sh
nargo compile
Expand Down Expand Up @@ -99,7 +99,7 @@ This time we will see a warning about an unused function parameter. This is expe

## Step 3 - Deploying

At this point we should have a compiled contract read to deploy. If we navigate to the deploy section in Remix, we will see many different environments we can deploy to. The steps to deploy on each environment would be out-of-scope for this guide, so we will just use the default Remix VM.
At this point we should have a compiled contract ready to deploy. If we navigate to the deploy section in Remix, we will see many different environments we can deploy to. The steps to deploy on each environment would be out-of-scope for this guide, so we will just use the default Remix VM.

Looking closely, we will notice that our "Solidity Verifier" is actually three contracts working together:

Expand All @@ -111,7 +111,7 @@ Remix will take care of the dependencies for us so we can simply deploy the Ultr

![Deploying UltraVerifier](@site/static/img/how-tos/solidity_verifier_5.png)

A contract will show up in the "Deployed Contracts" section, where we can retrieve the Verification Key Hash. This is particularly useful for double-checking the deployer contract is the correct one.
A contract will show up in the "Deployed Contracts" section, where we can retrieve the Verification Key Hash. This is particularly useful for double-checking that the deployer contract is the correct one.

:::note

Expand Down

0 comments on commit 90b636e

Please sign in to comment.