Skip to content

somaticbits/hentools

Repository files navigation


Logo

hentools

This repository contains the CLI tool used for operating directly on the smart contracts of the [hicetnunc](https://www.hicetnunc.xyz) marketplace.
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

The CLI tool is part of a bigger project of generative art called serialCore. It can be used to call the mint, swap, cancel and burn operations using the smart contracts directly instead of using the marketplace. It is not specific to the serialCore project, and can be used on any NFTs. Only conditions is that these tokens need to be either static images or videos.

The main framework used to create the CLI is Gluegun. It allows the creation of a command line tool based on Node.js (Typescript / Javascript).

The smart contract interaction is enabled through the usage of Taquito.

The main thought behind the creation of this project is to make it easier to use the smart contracts directly. Smart contracts are the core of Web3 technologies, and as such, are independent of any frontend associated with them.

Why creating a CLI tool instead of creating a frontend for the smart contracts? The decision comes more from a personal preference than a real reason. I've always been fascinated with using CLI and this was the perfect project to implement one. Also, the fact that there are already frontends existing for interacting with the smart contracts, made it an easier choice.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Node.js 12.0+ and a Tezos Wallet is needed. Some art in the form of static images and/or videos would also be useful.

Installation

  1. Get a Tezos account (optional if you already have one)
  2. Clone the repo and jump into the cloned folder
    git clone https://github.com/somaticbits/hentools.git
  3. Install NPM packages
    npm install
  4. Link the executable
    yarn link
  5. Enter the secret key of your Tezos account before launching hentools
    hentools setup tz1...
  6. (optional) In case the secret key is wrong or you want to remove it, you can reset it
    hentools setup -r

(back to top)

Usage

The main usage of this tool is the minting of NFTs on the hicetnunc marketplace.

The best way to use it is to copy the data folder from the example folder. Add your assets into the folder (images or videos). And finally fill up the automint.csv file with the corresponding information (remove the example row first).

If you want to swap right after the minting operation, fill up the swap_qty,xtz fields.

Once this is done, you can batch mint your NFTs:
hentools mint './data'

For the swapping procedure right after the minting, just add the -s option:
hentools mint './data' -s

For more examples, please refer to the Documentation

(back to top)

Testing

Prerequisites: Tezos Client

To test the cli, you'll need to create a Flextesa sandbox which allows to deploy the smart contracts developed for the hicetnunc marketplace in a sandbox.

  1. Prepare the Flextesa sandbox Docker container(this has currently a block time of around 3s, which allows for quick tests):
docker run --rm --name objkt-sandbox --detach -p 20000:20000 -e block_time=3 oxheadalpha/flextesa:latest ithacabox start
  1. Configure the tezos-client with the sandbox url
tezos-client -E http://localhost:20000 config update
  1. Run the test by running:
jest

Contact

David Pettersson - @somaticbits - david@somaticbits.com

Project Link: https://github.com/somaticbits/hentools

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published