-
Notifications
You must be signed in to change notification settings - Fork 21
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
cli: Initial Oasis CLI #595
Conversation
Codecov Report
@@ Coverage Diff @@
## main #595 +/- ##
==========================================
- Coverage 73.07% 71.54% -1.54%
==========================================
Files 102 109 +7
Lines 7777 8051 +274
==========================================
+ Hits 5683 5760 +77
- Misses 2072 2268 +196
- Partials 22 23 +1
Continue to review full report at Codecov.
|
08f5bd5
to
5158988
Compare
aacb4b3
to
993d02a
Compare
92e26a0
to
b80b7fd
Compare
|
ee4acfd
to
d47d139
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, some minor questions.
|
||
contractsCmd = &cobra.Command{ | ||
Use: "contracts", | ||
Short: "WebAssembly smart contracts operations", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for Cipher paratime only, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently yes, but in theory for any ParaTime that includes the contracts
module.
3e5ff85
to
d5d89e5
Compare
44042ef
to
85f1649
Compare
Bikeshedding this to hell and back is great and all, but it has utility functions that I need for other work. |
85f1649
to
3516a98
Compare
3516a98
to
ac8e394
Compare
questions := []*survey.Question{ | ||
{ | ||
Name: "description", | ||
Prompt: &survey.Input{Message: "Description:"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bit of an inconsistency. In the oasis network list
we use NAME
and here we ask for Description
.
I'm slightly more in favor of using Name
here and perhaps network_name
for the variables to avoid confusion with all other Name
things in this part of the code 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there are two things, "name" and "description". The name is an identifier used in various places to reference networks, paratimes etc. while "description" is something human readable that is also shown when signing a transaction.
} | ||
|
||
networkRmCmd = &cobra.Command{ | ||
Use: "rm <name>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be resolved in this PR, but could the shell completion be configured to list all the networks' names when one presses Tab after typing:
oasis network rm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this should be done in a separate PR, feel free to file an issue once this is merged.
configPath := filepath.Join(configDir, configFilename) | ||
|
||
v.AddConfigPath(configDir) | ||
v.SetConfigType("toml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think TOML will be better for the users 🙂 ?
I'm a bit more in favor or YAML 🙂
Since I'm blocked on this, I might as well request changes too:
|
Yeah and perhaps extract this in a separate commit and PR so it can be reviewed and merged earlier? |
Also |
e8c117a
to
a393d1c
Compare
Moved some of the config, connection and helpers stuff to the Go Client SDK. |
a393d1c
to
871f556
Compare
871f556
to
c293cfc
Compare
I'll merge the PR and we can improve the CLI in subsequent PRs. |
// See https://docs.oasis.dev/general/oasis-network/network-parameters. | ||
"mainnet": { | ||
ChainContext: "53852332637bacb61b91b6411ab4095168ba02a50be4c3f82448438826f23898", | ||
RPC: "grpc.oasis.dev:443", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resposting as this was lost in a file move:
does the grpc-web proxy lets us dial it from the normal grpc client? or is there an additional thing on that server that handles normal grpc?
No description provided.