Add cargo contract pack command
Created by: Robbepop
The proposed cargo contract pack
is going to do the following:
- Builds the contract:
cargo contract build
- Builds the metadata of the contract:
cargo contract metadata
- After both steps with their respective outputs in the
target/ink
directory thecargo contract pack
command additionally packs the generatedcontract.wasm
into thesource.wasm
field of themetadata.json
file and stores it ascontract.pack
.
As follow-up the Canvas UI (and eventually Polkadot JS Apps) should build in support for the .pack
extension and might even be able to drop support for non packed contracts completely.