Add `cargo encode` command
Created by: athei
The reverse function of cargo decode
should also exist. I think we don't need to support events here. Only message
and constructor
.
cargo encode --type message --name "flip" --arg true --arg "lol" flipper.{json,contract}
cargo encode --type constructor --name "new" --arg false flipper.{json,contract}
Please note that this functionality already exists as part of calling contracts with cargo contract call
.