warp icon indicating copy to clipboard operation
warp copied to clipboard

CLI from Warp SDK

Open ppedziwiatr opened this issue 2 years ago • 0 comments

A dedicated CLI needs to be created - as a way of reducing the entry barrier and further enhancing the DX.

The development should be splitted into phases:

  1. Phase 1 - MVP - CLI should implement all the most important features from the Contract interface, i.e.
  • contract deployment (js and wasm!)
  • contract deployment from existing source
  • writing contract interactions
  • reading contract state
  • calling contract's view functions

All the above features should have at least these (aparat from given command-specific) options avialable:

  • environment (local, testnet, mainnet)
  • logging level (fatal, error, info, debug, trace)
  1. Phase 2 - projects scaffolding - this version should allow to scaffold a new contract project with all required dependencies set, properly configured testing environment (and some template tests), deployment scripts etc. - from the available templates, like
  • PST (Rust, js, ts, as?)
  • ERC-20 (Rust, js, ts)
  • AtomicNFT (Rust, js, ts, as?) ..more?

Example teamplate https://github.com/warp-contracts/warp-wasm-templates/tree/main/rust/pst

It's still to decide whether CLI should be separate library or part of the main SDK. Probably the first, as adding this feature to the core SDK will:

  1. increase the bundle size
  2. may cause some issues with web bundlers (as it will probably require some node-specific deps and code).

If we decide to create it as a separate lib - w need to decide what versioning should be used (so that people won't be confused which CLI version works with which SDK, etc.). I believe the versioning should be exactly the same as the in SDK (but this would also mean that each new SDK version will require deploying of the new CLI - which might be a pain..)

ppedziwiatr avatar Aug 30 '22 11:08 ppedziwiatr