Skip to content

Commit

Permalink
update: nacho-token-contract package to v1.0.0 on NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
berzanorg committed May 7, 2024
1 parent 33ad70e commit 9f2695f
Show file tree
Hide file tree
Showing 8 changed files with 1,082 additions and 44 deletions.
21 changes: 21 additions & 0 deletions token-contract/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Berzan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions token-contract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# nacho-token-contract

The token smart contract built for [Nacho](https://github.com/berzanorg/nacho) using o1js.

[`nacho-token-contract`](https://www.npmjs.com/package/nacho-token-contract) package is intended to be used for [Nacho](https://github.com/berzanorg/nacho) only as it is a naive implementation.

## 📦 Installation

If you are using [`npm`](https://docs.npmjs.com/cli/):

```shell
npm install nacho-token-contract
```

If you are using [`yarn`](https://classic.yarnpkg.com/lang/en/docs/cli/):

```shell
yarn add nacho-token-contract
```

If you are using [`pnpm`](https://pnpm.io/pnpm-cli):

```shell
pnpm add nacho-token-contract
```

## 🔍 Details

Nacho's token contract extends o1js's existing token contract by implementing `approveBase` method's logic and adding a new method called `mint`.

### 🛠️ Smart Contract Methods

- `mint(to, amount)`:

Mints the given token amount to the given receiver with no checks.

- `transfer(from, to, amount)`:

Transfers the given token amount from the given address to the given address.

## 📝 License

This project is licensed under the MIT License.

You may use the source code of this project accordingly.

## 👤 About Me

I am [**Berzan**](https://berzan.org/) and I am developing [**Nacho**](https://nacho.finance/) to express my skills in the real world.

I built this library to use inside [**Nacho**](https://nacho.finance/).
Loading

0 comments on commit 9f2695f

Please sign in to comment.