Socket
Socket
Sign inDemoInstall

@hyperionbt/heph

Package Overview
Dependencies
3
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperionbt/heph

A CLI tool for writing smart contracts on the Cardano blockchain in Helios.


Version published
Maintainers
2

Readme

Source

Heph

Heph is a CLI tool for writing smart-contracts in the Helios programming language. Heph is inspired by Rust's Cargo and Cairo's Nile.

Installation

To install Heph:

$ sudo npm i -g @hyperionbt/heph

Note: sudo was needed to install the cli globally on my system.

Usage

Creating a Project

To create a new project, type heph init <project-name>, for example:

$ heph init atomic
  ✨ Created project 'atomic'
     type 'cd atomic'
     then type 'heph compile' to compile the project.

Compiling Code

Compiling a Project

To compile a Heph project run compile from inside the project directory, like so:

$ heph compile
  Creating 'build/' to store builds.
  🤖 Compiling all files in './'.
  🔨 Compiling 'atomic.hl'
  ✅ Done

Heph looks for a heph.config.json whenever heph compile is used to know where to find the contracts.

Compiling a Single File

To compile a single file Heph can be used like:

$ heph compile -i always.hl
  🔨 Compiling 'always.hl'
  ✅ Done

The name of the output file can be specified using the -o <out_file-path> option and contract parameters can be specified using the -p <params-path>.

$ heph compile -i always.hl \ 
    -o cool_output.json \
    -p secrets.json
  ...

Note: The file extensions for the output file and the params file are not necessary,

Compiling a directory

If for whatever reason you want to compile a whole directory that can be done by typing:

$ heph compile -d <directory-path>
  ...

Adding a Smart Contract to your project

To add a new contract to your project, you can use heph add <script-purpose> <contract-name>.

$ heph add spending atomic_nft
  Created './atomic_nft.hl' to store the contract
  Created 'tests/atomic_nft.test.hl' to store the tests.
  Created 'params/atomic_nft.params.json' to store the contract params.

TODO

  • Add testing with heph test.
  • Add contracts to project using heph add <script-purpose> <contract-name>.

FAQs

Last updated on 19 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc