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

[fastx cli] Implement Interactive CLI #353

Closed
oxade opened this issue Feb 3, 2022 · 4 comments
Closed

[fastx cli] Implement Interactive CLI #353

oxade opened this issue Feb 3, 2022 · 4 comments
Assignees

Comments

@oxade
Copy link
Contributor

oxade commented Feb 3, 2022

Based on this:
https://docs.google.com/document/d/1NPovLImNOgsxGo1-crCHW-lrGgRNztqek3BI-p0Cfeg/edit#

@oxade oxade added this to the GDC milestone Feb 3, 2022
@oxade oxade self-assigned this Feb 3, 2022
@oxade
Copy link
Contributor Author

oxade commented Feb 3, 2022

Preview of WIP CLI
Next steps: add routine to provision server and client states

mbp> ./cli                   
fastx>: 
fastx>: 
fastx>: 
fastx>: 
fastx>: 
fastx>: 
fastx>: help
 0.1.0
FastX Cli

USAGE:
     <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    addresses      List all addresses managed by client
    call           Call Move function in module
    certificate    Get the certificate with the given transaction digest
    help           Prints this message or the help of the given subcommand(s)
    new_address    Creates a new key pair
    object         Get obj info for this address
    objects        Get all obj info for this (hex encoded) address
    publish        Publish Move package
    start          Start FastX service
    transfer       Transfer object
fastx>: 
fastx>: 
fastx>: help call
call 0.1.0
Call Move function in module

USAGE:
    call [OPTIONS] --function <function> --gas-object-id <gas-object-id> --module <module> --package <package> --sender <sender>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --function <function>              Name of the function
        --gas-object-id <gas-object-id>    ID of the gas object for gas payment, in 20 bytes Hex string
        --module <module>                  Name of the module
        --object-args <object-args>...     Object IDs of the object arguments
        --package <package>                Object ID of the package, in 20 bytes Hex string
        --pure-args <pure-args>...         Pure arguments
        --sender <sender>                  Sender's address
        --type-args <type-args>...         Type arguments
fastx>: 
fastx>: publish 
error: Found argument '' which wasn't expected, or isn't valid in this context

USAGE:
    publish [OPTIONS] --gas-object-id <gas-object-id> --sender <sender>

For more information try --help
fastx>: call
error: The following required arguments were not provided:
    --function <function>
    --gas-object-id <gas-object-id>
    --module <module>
    --package <package>
    --sender <sender>

USAGE:
    call [OPTIONS] --function <function> --gas-object-id <gas-object-id> --module <module> --package <package> --sender <sender>

For more information try --help
fastx>: 
fastx>: 
fastx>: objects --address 1234567812345678123456781234567812345678123456781234567812345678
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| ObjectID                                 | Version           | Digest                                                                                                         |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| C57B959A54B39F3982C271B19854011B89573DFA | SequenceNumber(0) | ObjectDigest([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| 324596C03398DEB6E737886A4205A36BE6F3A660 | SequenceNumber(1) | ObjectDigest([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| A5C140BAA58FD165DD0981E760747436D5134545 | SequenceNumber(2) | ObjectDigest([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| DC386DABB9B79D7FE0A512A34FE84763995CEAFA | SequenceNumber(3) | ObjectDigest([3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| 74D5178961A37D82D8F11A9C142AB13D00C81EB9 | SequenceNumber(4) | ObjectDigest([4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| 9CC7BEC4B6CA3C57BB587105D23405E756CBB279 | SequenceNumber(5) | ObjectDigest([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| D042D6F8827AD47BD4050E07AB302821B6F3B246 | SequenceNumber(6) | ObjectDigest([6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| E8578D067DAFF0534FE77176F627200D1E75FAC2 | SequenceNumber(7) | ObjectDigest([7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| 41AFF421A6B4183BE6B740FAF7779DDC36BD6335 | SequenceNumber(8) | ObjectDigest([8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
| 19D38A8ED61ED3F370F847DECE9B5D87F3F8996C | SequenceNumber(9) | ObjectDigest([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) |
+------------------------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+
fastx>: 

@oxade
Copy link
Contributor Author

oxade commented Feb 4, 2022

Base PR:
#354

@oxade oxade changed the title [cli] Implement Interactive CLI [fastx cli] Implement Interactive CLI Feb 4, 2022
@patrickkuo patrickkuo assigned patrickkuo and unassigned oxade Feb 5, 2022
@huitseeker
Copy link
Contributor

See also #341

@patrickkuo
Copy link
Contributor

this is done in this PR #357

mwtian pushed a commit that referenced this issue Sep 12, 2022
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.18.2 to 1.19.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.18.2...tokio-1.19.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mwtian pushed a commit to mwtian/sui that referenced this issue Sep 29, 2022
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.18.2 to 1.19.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.18.2...tokio-1.19.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

No branches or pull requests

3 participants