rooch-network / rooch

VApp Container with Move Language
https://rooch.network
Apache License 2.0
133 stars 60 forks source link

[CLI] Support account transfer command #1658

Closed vegetabledogdog closed 1 month ago

vegetabledogdog commented 1 month ago
rooch account transfer --help
Transfer coin

Usage: rooch account transfer [OPTIONS] --to <TO> --coin-type <COIN_TYPE> --amount <AMOUNT>

Options:
  -t, --to <TO>
          The account's address to receive coin, if account not exist, auto create account
  -c, --coin-type <COIN_TYPE>
          Struct name as `<ADDRESS>::<MODULE_ID>::<STRUCT_NAME><TypeParam>` Example: `0x3::gas_coin::GasCoin`, `0x123::Coin::Box<0x123::coin_box::FCoin>`
  -a, --amount <AMOUNT>
          The amount of coin to transfer
      --chain-id <CHAIN_ID>
          chain_id  [ROOCH: 20230101] [BITCOIN: 0] [ETHER: 60] [default: 20230101]
      --sender <SENDER>
          Sender account address [default: default]
      --max-gas-amount <MAX_GAS_AMOUNT>
          Custom the transaction's gas limit. [default: 1_000_000_000] [alias: "gas-limit"]
      --authenticator <AUTHENTICATOR>
          Custom the transaction's authenticator format: `auth_validator_id:payload`, auth validator id is u64, payload is hex string example: 123:0x2abc
      --session-key <SESSION_KEY>
          Sign the transaction via session key This option conflicts with `authenticator`
      --config-dir <CONFIG_DIR>
          rooch config path
  -h, --help
          Print help

test: cargo test -p testsuite --test integration -- --name account

issue: #792

By the way, there seems like an error in the rooch bitcoin test.

Scenario: rooch bitcoin test
✘  Given a bitcoind server for rooch_bitcoin_test
      Step failed:
      Defined: features/cmd.feature:309:7
      Matched: crates/testsuite/tests/integration.rs:106:1
      Step panicked. Captured output: failed to list docker networks: Os { code: 2, kind: NotFound, message: "No such file or directory" }
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-rooch-portal-v1 ❌ Failed (Inspect) May 7, 2024 2:00pm
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **rooch** | ⬜️ Ignored ([Inspect](https://vercel.com/rooch/rooch/BP4hiR8C5r7tkiNLDbxe1mARz8Xn)) | [Visit Preview](https://rooch-git-fork-vegetabledogdog-main-rooch.vercel.app) | | May 7, 2024 2:00pm |
jolestar commented 1 month ago

rooch_bitcoin_test requires the docker cli.