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

generator-venom-scaffold

v0.1.4

Published

Yeoman generator to scaffold ready-to-use projects for smart contract developing on Venom-like blockchains.

Downloads

14

Readme

About The Venom Scaffold

The Venom scaffold is inspired by the Truffle boxes and aims to help users create a project ready to test, deploy, and execute arbitrary scripts to develop smart contracts on TVM-based blockchains. Under the hood, it's a yeoman generator.

You can find a list of available templates running:

yo venom-scaffold --help

Or run the cli and choose the project template on the first step.

yo venom-scaffold <new-project-path>

To create your first project, we have a tutorial. Follow the instructions and make your first TIP3 token (TIP3 is a token standard, like ERC20 in Ethereum world).

Table of Contents

Installation

npm install --global yo generator-venom-scaffold

Usage

The simplest way - is to run cmd and answer the prompt questions.

# run cmd
❯ yo venom-scaffold <new-project-path>

After that, go to the <new-project-path> and follow the instructions in the README.md

Get help

You can run the generator with the help option to get more info about usage. Also, you can get a help message for the sub-generator.

# get help for venom-scaffold
❯ yo venom-scaffold --help

# get help for venom-scaffold sub-generator
❯ yo venom-scaffold:tip3 --help

Configuration

To set up a project, you can answer the prompt questions, use options or config file.

You can find the available options with cmd yo venom-scaffold --help. To find options for sub-generators, use yo venom-scaffold:<sub-generator> --help. For example, yo venom-scaffold:tip3 --help.

All options can also be defined using the config file.

For example, let's set up a project with config.json file. First, we need to get all available options:

❯ yo venom-scaffold --help
Usage:
  yo venom-scaffold:app [<path>] [options]

Options:
  -h,   --help           # Print the generator's options and usage
        --skip-cache     # Do not remember prompt answers                                    Default: false
        --skip-install   # Do not automatically install dependencies                         Default: false
        --force-install  # Fail on install dependencies error                                Default: false
        --ask-answered   # Show prompts for already configured options                       Default: false
        --config         # Path to the config file
        --locklift       # Use Locklift as a development environment?                        Default: true
        --pkg-manager    # Package manager to use (npm|yarn)
  -t,   --template       # Template to create project: 'sample' | 'tip3' | 'tip4'

Arguments:
  path  # Path to the project folder  Type: String  Required: false

Description:
  The Venom scaffold is inspired by the Truffle boxes and aims to help users create a project ready to test, deploy, and execute arbitrary scripts to develop smart contracts on TVM-based blockchains.

Subgenerators:
  yo venom-scaffold:sample [<path>] [options]
  yo venom-scaffold:tip3   [<path>] [options]
  yo venom-scaffold:tip4-1 [<path>] [options]

Let's create config.json file and specify options:

{
  "locklift": true,
  "pkg-manager": "npm",
  "template": "tip3",
  "path": "my-first-tip3-token"
}

To provide config, use options --config

yo venom-scaffold --config config.json

You can configure sub-generators as well. To get a list of options, you can run cmd:

❯ yo venom-scaffold:tip3 --help
Usage:
  yo venom-scaffold:tip3 [<path>] [options]

Options:
  -h,   --help                # Print the generator's options and usage
        --skip-cache          # Do not remember prompt answers                                         Default: false
        --skip-install        # Do not automatically install dependencies                              Default: false
        --force-install       # Fail on install dependencies error                                     Default: false
        --ask-answered        # Show prompts for already configured options                            Default: false
        --config              # Path to the config file
        --locklift            # Use Locklift as a development environment?                             Default: true
        --pkg-manager         # Package manager to use (npm|yarn)
        --compiler            # Compiler version                                                       Default: 0.59.0
        --linker              # Linker version                                                         Default: 0.15.48
        --root-owner-address  # Address of the contract root owner
        --token-name          # The name of your token
        --token-symbol        # The symbol of your token
        --initial-supply      # The number of tokens that will be issued immediately after deployment
        --initial-supply-to   # Address of initial token supply recipient
        --decimals            # The number of decimals that your token should have
        --disable-mint        # Disables additional emission of tokens
        --disable-burn        # Disables tokens burning
        --pause-burn          # Temporarily disables token burning
        --remaining-gas-to    # Address to send the remaining gas

Arguments:
  path  # Path to the project folder  Type: String  Required: false

TIP3 tutorial

First, install yo, clone venom-scaffold generator, install dependencies and create a symlink to a package folder. Follow the installation instructions to pass this step.

Awesome! Now we are ready to create your first TIP3 token.

Cli takes as an argument, indicating which directory to create a new project. By default, it is the current directory.

In this tutorial, we will create a project in the directory ~/projects/first-tip3-token. You can choose any directory.

yo venom-scaffold ~/projects/first-tip3-token

NOTE: To navigate over list use arrows. To submit answer use enter.

NOTE: If you don't ready to answer some questions, you can leave them empty. A default or empty value will be used in this case.

Now you should answer some questions to create a project which will fit you. Questions grouped by topic:

Choose a project template

In this tutorial, we will create TIP3 token, so choose a Fungible token (TIP3) at this step.

Set up package manager and package.json

In this tutorial, we will use npm as a package manager. You can choose yarn as well. Next, you should answer questions to set up package.json.

Configure TIP3 token

In this section, we will configure our token. Let's take a look at each question in more detail.

Enter the address of the contract root owner

You can create your account with Venom wallet. The contract root owner can deploy new token wallets and mint/burn tokens.

0:123...baa

Enter the name of your token

Name - is a string of arbitrary length, which will be used as a token name.

First Venom Token

Enter the symbol of your token

A symbol is a short name of your token.

FVT

Specify the number of tokens that will be issued immediately after deployment

Amount of tokens that will be minted immediately after deployment.

1000000000

Enter the address to send initially minted tokens

Address of initial token supply recipient.

0:123...baa

How many decimals will the token have?

The number of decimals that your token should have.

18

Disable additional emission of tokens?

If additional emission of tokens is disabled, you will not have the ability to mint tokens after initial minting

No

Disable tokens burn?

If tokens burning are disabled, you will not have the ability to burn tokens.

No

Pause ability to burn tokens? Available only if tokens burning were enabled in the previous step

Temporarily disables token burning. In the future, you can enable it with the method setBurnPaused({answerId:0, paused:false}).

No

Enter the address to send remaining gas

All remaining gas will be sent to this address.

0:123...baa

Configure locklift development environment

NOTE: Locklift is a development environment like Hardhat or Truffle. We highly recommend using it as a developer tool.

Enter compiler version

As a compiler, we use TON-Solidity-Compiler - port of the Solidity smart-contract compiler generating TVM bytecode for the Venom blockchain. You can find compiler API here. For TIP3 contracts, we recommend to use version 0.59.0

0.59.0

Enter linker version

Linker takes TVM assembly source code of TON smart contract, compiles it and links its parts, adds standard selector and runtime and stores it into binary TVC file.

0.15.48

Select blockchain (Use arrow keys)

Venom and Everscale use the same virtual machine, compilers, and linkers. So you can deploy contracts in Venom just like in Everscale.

Venom

Giver type (testnet | mainnet)

Giver - it's an account that you will use to fund your smart contracts. There are several types of givers that you can use (SimpleWallet, GiverWallet, WalletV3). You can create your giver type. To do this, you need to deploy a contract that implements Giver interface. The easiest way to setting up giver is to use a WalletV3 account. The venom wallet uses this type of account. So you can create a new account with venom wallet and use it as a giver.

WalletV3

Giver address (testnet | mainnet)

Address of the giver contract.

0:123...baa

Giver seed phrase (testnet | mainnet)

Seed phrase of the giver account. You can omit empty this field and provide it manually in locklift.config.ts later.

action inject penalty envelope rabbit element slim tornado dinner pizza off blood

Giver privateKey (testnet | mainnet)

The private key of the giver account. You can omit empty this field and provide it manually in locklift.config.ts later.

172af540e43a524763dd53b26a066d472a97c4de37d5498170564510608250c3

Run project

Fantastic, the project is ready! Follow the instructions in the project README to find the next steps.