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

Deploy errors out on capacity parsing #131

Closed
phroi opened this issue Sep 28, 2023 · 3 comments · Fixed by #139
Closed

Deploy errors out on capacity parsing #131

phroi opened this issue Sep 28, 2023 · 3 comments · Fixed by #139

Comments

@phroi
Copy link

phroi commented Sep 28, 2023

Describe the bug

Running capsule deploy:

capsule deploy --address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqwgx292hnvmn68xf779vmzrshpmm6epn4c0cgwga

Returns the following error message:

thread 'main' panicked at 'parse capacity: "decimal part too long: 14"', /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ckb-capsule-0.10.1/src/wallet/cli_types/live_cell_info.rs:48:14

Additional context

  • See ickb/v1-core for the full environment context
  • Output of capsule --version: Capsule 0.10.1
  • Output of ckb-cli --version: ckb-cli 1.4.0 (31c858e 2023-07-18)
  • Output of the commmand re-run with RUST_BACKTRACE=1 RUST_LOG=capsule=trace:
$ RUST_BACKTRACE=1 RUST_LOG=capsule=trace capsule deploy --address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqwgx292hnvmn68xf779vmzrshpmm6epn4c0cgwga
thread 'main' panicked at 'parse capacity: "decimal part too long: 14"', /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ckb-capsule-0.10.1/src/wallet/cli_types/live_cell_info.rs:48:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/result.rs:1651:5
   3: ckb_capsule::wallet::cli_types::live_cell_info::<impl core::convert::From<ckb_capsule::wallet::cli_types::live_cell_info::LiveCellInfo> for ckb_capsule::wallet::cli_types::live_cell::LiveCell>::from
   4: ckb_capsule::wallet::collector::Collector::collect_live_cells
   5: ckb_capsule::wallet::wallet::Wallet::collect_live_cells
   6: ckb_capsule::wallet::wallet::Wallet::complete_tx_inputs
   7: ckb_capsule::deployment::deployment_process::DeploymentProcess::build_recipe
   8: ckb_capsule::deployment::deployment_process::DeploymentProcess::prepare_recipe
   9: ckb_capsule::deployment::manage::Manage::deploy
  10: capsule::run_cli
  11: capsule::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Keep up the great work 💪
Phroi

phroi added a commit to ickb/v1-core that referenced this issue Oct 13, 2023
@doitian
Copy link
Member

doitian commented Dec 21, 2023

ckb-cli returns capacity as a string like this:

300000.0 (CKB)

@blckngm
Copy link
Collaborator

blckngm commented Dec 22, 2023

Capsule deploy is no longer actively maintained and may not work with later versions of ckb-cli. You can use ckb-cli deploy or other options.

@phroi
Copy link
Author

phroi commented Jan 1, 2024

@doitian then we both agree capacity is an integer, just tell that to the capsule deploy command!! 😉

Gotcha @blckngm, for now I developed an iCKB's deployer that also does a couple more things. It also helps me debugging changes to the underlying iCKB's Lumos Utils library.

Apart from #139, also feel free to update the relevant documentation: https://docs.nervos.org/docs/labs/sudtbycapsule/#deploy

@jjyr jjyr closed this as completed in #139 Jan 4, 2024
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 a pull request may close this issue.

3 participants