Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add deploy subcommand #515

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

TheWaWaR
Copy link
Collaborator

@TheWaWaR TheWaWaR commented Nov 7, 2022

Features

  • sighash/multisig lock/unlock
  • type id
  • dep group
  • migration
  • outpoint/file as data source
  • offline sign

A brief usage

#### Init config
ckb-cli deploy init-config --deployment-config deployment.toml

# >>>> Then edit deployment.toml file

#### Generate intermedium information
ckb-cli deploy gen-txs \
    --deployment-config ./deployment.toml \
    --migration-dir ./migrations \
    --from-address ckt1qyqvsv5240xeh85wvnau2eky8pwrhh4jr8ts8vyj37 \
    --sign-now \
    --info-file info.json

#### sign with key
ckb-cli deploy sign-txs \
    --from-account ckt1qyqvsv5240xeh85wvnau2eky8pwrhh4jr8ts8vyj37 \
    --add-signatures \
    --info-file info.json 

#### sign with another key (support multisig and offline sign)
ckb-cli deploy sign-txs \
    --from-account ckt1qyqyqnuss20vpevzrt46n0886h5yrn5l07jsgz7kfp \
    --add-signatures \
    --info-file info.json 

#### Explain the deploy action
ckb-cli deploy explain-txs --info-file info.json
# ==== Cell transaction ====
# [cell] Changed   name:      my_cell, old-capacity: 43026.0, new-capacity: 43006.0
# [cell] Unchanged name: genesis_cell, old-capacity:   202.0, new-capacity:   202.0
# > old total capacity: 43228.0 (CKB) (removed items not included)
# > new total capacity: 43208.0 (CKB)
# ==== DepGroup transaction ====
# [dep_group] Changed   name: my_dep_group, old-capacity:   137.0, new-capacity:   137.0
# > old total capacity: 137.0 (CKB) (removed items not included)
# > new total capacity: 137.0 (CKB)

#### Set signatures to witnesses and send to CKB node
ckb-cli deploy apply-txs \
    --migration-dir ./migrations \
    --info-file info.json

@TheWaWaR TheWaWaR mentioned this pull request Nov 7, 2022
6 tasks
@TheWaWaR TheWaWaR merged commit a394de2 into nervosnetwork:develop Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants