near / cargo-near

Cargo extension for building Rust smart contracts on NEAR
Apache License 2.0
34 stars 17 forks source link

`cargo near deploy` command to deploy the current project to blockchain #107

Closed frol closed 11 months ago

frol commented 1 year ago

cargo near deploy should do the following:

  1. Run cargo near build code internally
  2. Integrate with near-cli-rs code in such a way that interactive part picks up from near contract deploy my-new-dev-account.testnet use-file ./target/near/adder.wasm ...

So the final command could look like:

cargo near deploy \
    frol.near \
    with-init-call \
        new \
        json-args '{"param1": 1}' \
        prepaid-gas '100.000 TeraGas' \
        attached-deposit '0 NEAR' \
    network-config testnet \
    sign-with-...
cargo near deploy \
    frol.near \
    without-init-call \
    network-config testnet \
    sign-with-...

Note: We don't want to implement dev-deploy magic in cargo-near, instead, I suggest to introduce cargo near create-dev-account #106

Note: All the features available in near-cli-rs for deployment should be inherited here, so near-cli-rs should be reused here.