npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cleos-plus

v2.0.4

Published

A helper tool to help develop EOS smart contracts.

Downloads

3

Readme

cleos-plus

A helper tool to help develop EOS smart contracts.

Installation:

npm i -g cleos-plus

Why?

Deploying a smart contract for development involves a lot of steps, which are fairly mundane. This tool will help you with some of the plumbing. You can use this tool to speed up your development process. To deploy a contract, you simply need to create the cpp files and, this will handle the compiling and deployment part for you.

Prerequisites:

How to use:

  • Create a config file first by cleos-plus -i
  • Edit the file:
{
    "api": "http://localhost:7777", // The HTTP endpoint for EOS node
    "contractDir": "", // Absolute path to the directory having contracts
    "owner": {
        "name": "", // Account name
        "key": "" // Account private key
    }
}
  • Import changes by cleos-plus -c
  • Verify that the config has been imported by cleos-plus --view-config

Contracts directory:

This directory has all the smart contracts. To create a new contract named hello, create a directory named hello in your given contracts dir. It must contain a hello.cpp file in the root, in order to be compiled by eosio-cpp.

Usage:

  • Create a new account:
cleos-plus --create-account=helloworld
  • Deploy a contract to an account:
cleos-plus --deploy-name=helloworld --deploy-dir=helloworld

If you omit the --deploy-dir param, it will assume the contract directory name to be same as the --deploy-name. If --deploy-name account doesn't exist, it will create one.

  • Deploy current working directory contract to an account:
cleos-plus -d=accountname

This will deploy the contract in the current working directory. If left blank, the account name will be assumed as the directory name.

  • Test a contract by sending an action using an account:
cleos-plus --test-contract=mytestcontract --action=actionname --payload='["string", 5, 150,  "more string"]' --auth=authaccountname

The payload must be a valid JSON object, so strings have to be double quoted. test-contract is the name of the contract you want to test. action is the name of the function. auth is the account used for signing the transaction.