SamJeffrey8/simple-nft-minter


License: Apache-2.0

Language: Nix


Simple NFT MInter

This project gives a simple nft minter project for using the Plutus Platform.

Cabal Nix build

Alternatively, use the Cabal Nix build if you want to develop with incremental builds, but also have it automatically download all dependencies.

Set up your machine to build things with Nix, following the Plutus README (make sure to set up the binary cache!).

To enter a development environment, simply open a terminal on the project's root and use nix-shell to get a bash shell:


$ nix-shell

Otherwise, you can use direnv which allows you to use your preferred shell. Once installed, just run:


$ echo "use nix" > .envrc # Or manually add "use nix" in .envrc if you already have one

$ direnv allow

and you'll have a working development environment for now and the future whenever you enter this directory.

The build should not take too long if you correctly set up the binary cache. If it starts building GHC, stop and setup the binary cache.

Afterwards, the command cabal build from the terminal should work (if cabal couldn't resolve the dependencies, run cabal update and then cabal build).

Also included in the environment is a working Haskell Language Server you can integrate with your editor.

See here for instructions.

The Plutus Application Backend (PAB) example

Here, the PAB is configured with one contract, the SimpleNFT contract from .src/Plutus/Contracts/SimpleNFT.hs.

  1. Build the PAB executable:

cabal build simplenft

  1. Run the PAB binary:

cabal exec -- simplenft

This will then start up the server on port 9080.

  1. Check what contracts are present:

curl -s http://localhost:9080/api/contract/definitions | jq

You should receive a list of contracts and the endpoints that can be called on them, and the arguments required for those endpoints.

We're interested in the NFTContract one.

Connect PAB to Client

You can create your own client with any client side framework/libraries and set up proxy to connect with the PAB without CORS issues. You can check out this repo for the react client of this simple NFT minter.

Thanks!

Project Statistics

Sourcerank 3
Repository Size 107 KB
Stars 9
Forks 8
Watchers 1
Open issues 0
Dependencies 0
Contributors 10
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Noon van der Silk Luigy Leon Michael Peyton Jones koslambrou Sam Jeffrey M Matthias Sieber Vivek205 Jann Müller lambdacc

Something wrong with this page? Make a suggestion

Last synced: 2024-05-01 01:20:15 UTC

Login to resync this repository