CLI

create

Overview

contract create is a command that create a new contract.

Synopsis

contract create [-f | --file <file.contract>] [-d | --dir <contract_dir>]

Description

The create command creates a new contract file or directory. If a file is specified, a new contract file will be created. If a directory is specified, a new contract directory will be created. Either a path to a file or directory must be specified. A contract file is a packed version of a contract directory. See the pack and unpack commands for more information.

Options

-h
--help

Show help

-f
--file

Any of the above will specify where to create a new contract file.

-d
--dir

Specifies where to create a new contract directory.

One of the two options need to be specified.

Examples

Get help:

$ contract create --help 

contract create

creates a new contract

Options:
      --version  Show version number  [boolean]
  -h, --help     Show help  [boolean]
  -f, --file     where to output a contract file [filepath]
  -d, --dir      creates a new contract directory [dirpath]

Create a new contract file:

$ contract create --file example.contract

contract file created at: example.contract

Create a new contract directory:

$ contract create --dir example

contract directory created at: example

See Also