Skip to content

Commit

Permalink
Merge pull request #805 from LuffySama-Dev/hfaudit05luffy
Browse files Browse the repository at this point in the history
✅ Tested with latest version and updated the docs
  • Loading branch information
barriebyron authored Jan 24, 2024
2 parents c6ed759 + 40266c1 commit 12a7dce
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/zkapps/tutorials/05-common-types-and-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The [example project](https://github.com/o1-labs/docs2/tree/main/examples/zkapps

## Prerequisites

This tutorial has been verified with [Mina zkApp CLI](https://github.com/o1-labs/zkapp-cli) version `0.11.0` and [SnarkyJS](https://www.npmjs.com/package/snarkyjs) `0.12.1`.
This tutorial has been tested with [zkApp CLI](https://github.com/o1-labs/zkapp-cli) version `0.16.0` and [o1js](https://www.npmjs.com/package/o1js) version `0.15.2`.

Ensure your environment meets the [Prerequisites](/zkapps/tutorials#prerequisites) for zkApp Developer Tutorials.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 44 additions & 20 deletions examples/zkapps/05-common-types-and-functions/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,49 @@
# Mina zkApp: 05 Common Types And Functions

This template uses TypeScript.

## How to build

```sh
npm run build
```

## How to run tests

```sh
npm run test
npm run testw # watch mode
```

## How to run coverage

```sh
npm run coverage
```
This tutorial helps you learn about types you can use when building with o1js. Earlier tutorials mostly use the Field type. o1js provides other higher-order types built from Fields that are useful for zkApp development and expand the possibilities for more applications.

## Version
- o1js: **0.15.2**

## Tutorial

For the step-by-step tutorial, see [Tutorial 5: Common Types And Functions](https://docs.minaprotocol.com/zkapps/tutorials/common-types-and-functions).

## How to install and run this example project

1. Clone the repository:
```sh
git clone https://github.com/o1-labs/docs2.git
```
2. Change directory to the project location:
```sh
cd docs2/examples/zkapps/05-common-types-and-functions
```
3. Install dependencies:
```sh
npm install
```

4. Build the project:
```sh
npm run build
```

5. Run the compiled code:
```sh
node build/src/main.js
```
To run and build the compiled code with a single command:
```sh
npm run build && node build/src/main.js
```

## Expected output
![05output](05output.png)

## Last audit date

**22-January-2024**

## License

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/zkapps/05-common-types-and-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"typescript": "^4.7.2"
},
"peerDependencies": {
"o1js": "0.15.1"
"o1js": "0.15.*"
}
}

1 comment on commit 12a7dce

@vercel
Copy link

@vercel vercel bot commented on 12a7dce Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs2 – ./

docs2-minadocs.vercel.app
docs2-git-main-minadocs.vercel.app
docs.minaprotocol.com

Please sign in to comment.