Docs
Submit an issue
Smart Contracts
Smart Contracts
  • WELCOME
    • Smart Contracts
    • Installing Pop CLI
    • How to contribute
  • GUIDES
    • Get tokens on Pop (Testnet)
    • Set up your development environment
    • Create a new contract
    • Build your contract
    • Run your unit tests
    • Deploy your contract locally
      • Deploy locally on a Solochain
      • Deploy locally on Pop
    • Call your contract
    • Running E2E tests
    • Deploy on Pop
    • Securely Sign Transactions from CLI
    • Getting Started with ink! v6
  • TUTORIALS
    • Your first ink! smart contract
    • Mint a PSP22 token on Pop
  • POP CLI
    • welcome
    • install
    • new
    • build
    • call
    • up
    • test
    • clean
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. POP CLI

new

Generate a new smart contract

There are different ways of generating a smart contract with Pop CLI.

The recommended way is the interactive way:

pop new contract
┌   Pop CLI : Generate a contract
│
◇  Name of your contract?
│  my_contract
│
◇  Where should your project be created?
│  ./
│
◆  Select a contract type: 
│  ● Examples (Contract examples for ink!. 1 available option(s))
│  ○ ERC 
└  

You can also create a contract manually:

pop new contract my_contract --contract-type erc --template erc721

Note that the template has to be part of a specific contract type.

Additional options:

pop new contract --help

Generate a new smart contract

Usage: pop new contract [OPTIONS] [NAME]

Arguments:
  [NAME]  Name of the contract

Options:
  -c, --contract-type <CONTRACT_TYPE>  Contract type. [default: examples] [possible values: examples, erc]
  -p, --path <PATH>                    Path for the contract project, [default: current directory]
  -t, --template <TEMPLATE>            Template to use. [possible values: standard, erc20, erc721, erc1155]
PreviousinstallNextbuild

Last updated 11 months ago

Was this helpful?