inkdevhub / swanky-cli

The all-in-one developer environment for Parity pallet-contracts based smart contracts!
https://docs.astar.network/docs/build/wasm/swanky-suite/cli/
MIT License
70 stars 29 forks source link

Add `verify` feature #194

Closed prxgr4mm3r closed 7 months ago

ipapandinas commented 8 months ago

I am also wondering if these feature must be released once parity supports the --verifiable argument in a stable release, since the current one, 4.0.0-rc.1, is a release candidate @vsofiya

prxgr4mm3r commented 8 months ago

@ipapandinas It works locally on my machine. I test it this way:

  1. I create a new swanky project
    
    ➜  swanky-cli git:(feature/verifiable) ✗ ../swanky-cli/bin/run.js init ../temp_proj
    ? Which contract template should we use initially? flipper
    ? What should we name your initial contract? flipper
    ? What is your name? prxgr4mm3r
    ? What is your email? 
    ? Do you want to download Swanky Node? Yes
    ✔ Copying common template files OK
    ✔ Checking dependencies OK
    ✔ Copying contract template files OK
    ✔ Processing templates OK
    ✔ Installing dependencies OK
    ✔ Initializing git OK
    ✔ Downloading Swanky node OK
    ✔ Writing config OK
    🎉 😎 Swanky project successfully initialised! 😎 🎉

➜ swanky-cli git:(feature/verifiable) ✗ cd ../temp_proj

2. From temp_project folder run
```bash
➜  temp_proj git:(master) ✗ ../swanky-cli/bin/run.js contract compile flipper --verifiable

The contract was built in RELEASE mode.

Your contract artifacts are ready. You can find them in:
/home/prxgr4mm3r/RustroverProjects/temp_proj/target/ink/flipper

  - flipper.contract (code + metadata)
  - flipper.wasm (the contract's code)
  - flipper.json (the contract's metadata)
✔ flipper Contract compiled successfully
✔ Moving artifacts OK
✔ flipper contract's TS types Generated successfully
  1. Verify compiled contract
    ➜  temp_proj git:(master) ✗ ../swanky-cli/bin/run.js contract verify flipper       
    ✔ flipper Contract verified successfully

Can you try to build a contract without swanky-cli, just with cargo-contract, and let me know if it works on your side?