use-ink / contracts-ui

Web application for deploying wasm smart contracts on Substrate chains that include the FRAME contracts pallet
https://contracts-ui.substrate.io/
GNU General Public License v3.0
62 stars 47 forks source link

Provide easy installable via brew, npm, or cargo #373

Open wottpal opened 1 year ago

wottpal commented 1 year ago

Hey there, I love what you've built with contracts-ui!

For new devs and/or terminal maniacs that don't want to rely on the only version or an internet connection for development, it would be awesome to have an easier way to install this thing. And then fire it up via a terminal command which also opens a browser automatically.

As substrate-contracts-node is already installable via cargo it would probably be consistent to have something like substrate-contracts-ui installable similarly. But I'm not sure (due to inexperience with cargo) if javascript/npm projects are possible. I would be fine with a brew or global npm package, too.

Alternatively, it could be a gret idea to bundle this with substrate-contracts-node directly and then allow some kind of substrate-contracts-node --with-ui flag that automatically: starts the node, starts & opens contracts-ui, and preselects the local node. This also has the additional advantage that incompatibility issues (like https://github.com/paritytech/substrate-contracts-node/issues/157#issuecomment-1308495927) are eliminated implicitly by only bundling dependencies that are compatible (and if there is none, a warning can be shown).

wottpal commented 1 year ago

For completeness, this is my current solution to tackle this: https://github.com/scio-labs/inkathon/blob/28dcecc204da363e7301b590321635ac45ae78ed/packages/contracts/package.json#L11

Unfortunately, with online-versions of Contracts-UI & Polkadot.js explorer only. This makes it not only rely on a stable internet connection during development but is also a tiny bit more error-prone (e.g. on Brave Browser it doesn't work on default even with the most conservative Shields configuration).

statictype commented 1 year ago

thanks @wottpal for submitting this. we definitely have something like this on the roadmap