People are often confused about how cargo contract new flipper creates a proper flipper ink! smart contract while cargo contract new erc20 does not create a proper ERC-20 contract.
This is intentional and also we cannot solve the problem of inferring logic and code of what people have in mind when they write up some name for a smart contract, e.g. flipper, erc20 or whatever.
Also the cargo contract new command deliberately mimics the cargo new command.
Instead what we could do is to provide yet another cargo contract command called template that provides to create a new ink! smart contract template from a given variety of predefined templates. These could include flipper, erc20, erc721, multi-sig etc.
Random thought: It would be cool to have a way to choose between different contract templates. E.g, do you want to use an ink! provided template, or maybe a template from (for example) OpenZeppelin
People are often confused about how
cargo contract new flipper
creates a proper flipper ink! smart contract whilecargo contract new erc20
does not create a proper ERC-20 contract. This is intentional and also we cannot solve the problem of inferring logic and code of what people have in mind when they write up some name for a smart contract, e.g.flipper
,erc20
or whatever.Also the
cargo contract new
command deliberately mimics thecargo new
command. Instead what we could do is to provide yet anothercargo contract
command calledtemplate
that provides to create a new ink! smart contract template from a given variety of predefined templates. These could includeflipper
,erc20
,erc721
,multi-sig
etc.