Skip to content

Commit

Permalink
📚 Improve command descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
beskay committed Sep 20, 2023
1 parent 3848a0f commit 000e41d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ var authCmd = &cobra.Command{
Use: "auth <discord | wallet>",
Short: "Authenticate your account or link your wallet address",
Long: `Authenticate your account or link your wallet address.
Currently Discord is the only available platform to auth.
Currently, Discord is the only available platform for authentication.
Linking your wallet address enables submissions from the website.
To link it, run 'evmr auth wallet' and enter your wallet address.
Linking your wallet address enables submissions from the website. To link it, run
'evmr auth wallet' and enter your wallet address.
If your Discord username changed and you want to update it,
run 'evmr auth discord' again.`,
If your Discord username has changed and you want to update it, run
'evmr auth discord' again.`,

RunE: func(cmd *cobra.Command, args []string) error {

Expand Down
4 changes: 2 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ var initCmd = &cobra.Command{
Short: "Initialize evm-runners",
Long: `Initialize evm-runners by
1. Cloning the ethernautdao/evm-runners-levels.git repository into ./evmr-levels
2. Creating a .env file in ~/.config/evm-runners/`,
1. Cloning the 'ethernautdao/evm-runners-levels.git' repository into './evmr-levels'.
2. Creating a .env file in '~/.config/evm-runners/'.`,

RunE: func(cmd *cobra.Command, args []string) error {
// Get user's home directory
Expand Down
2 changes: 1 addition & 1 deletion cmd/leaderboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

var leaderboardCmd = &cobra.Command{
Use: "leaderboard [level]",
Short: "Display the gas and codesize leaderboard for a specific level",
Short: "Display gas and codesize leaderboard for a specific level",

RunE: func(cmd *cobra.Command, args []string) error {
// load config
Expand Down
16 changes: 8 additions & 8 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ var rootCmd = &cobra.Command{
Long: `A terminal-based game for developers with EVM-based levels.
How to play:
1. 'evmr init' to initialize evm-runners
2. 'evmr start [level]' to start solving a level
3. 'evmr validate <level>' to test your solution
1. 'evmr init' - Initialize evm-runners.
2. 'evmr start [level]' - Begin solving a level.
3. 'evmr validate <level>' - Test your solution.
How to submit a solution:
1. 'evmr auth discord' to register your account
2. 'evmr submit <level>' to submit your solution
3. 'evmr leaderboard [level]' to see your position on the leaderboard
1. 'evmr auth discord' - Register your account.
2. 'evmr submit <level>' - Submit your solution.
3. 'evmr leaderboard [level]' - Check your leaderboard position.
For a list of all available levels, use 'evmr levels'
For a list of all available levels, use 'evmr levels'.
Arguments in <> are required, arguments in [] are optional.`,
Note: Arguments in <> are required, while arguments in [] are optional.`,
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
7 changes: 2 additions & 5 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import (
// startCmd represents the start command
var startCmd = &cobra.Command{
Use: "start [level]",
Short: "Start solving a level",
Long: `Start solving a level. This command copies the template file from
evm-runners/template to evm-runners/src/
You can then validate your solution with 'evmr validate' or by using the forge test command.`,
Short: "Begin solving a level",
Long: `Begin solving a level. If no level is specified, a list of available levels will be displayed.`,

RunE: func(cmd *cobra.Command, args []string) error {
lang, _ := cmd.Flags().GetString("lang")
Expand Down
7 changes: 6 additions & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ import (
// updateCmd represents the update command
var updateCmd = &cobra.Command{
Use: "update",
Short: "Update evm-runners levels",
Short: "Update the local evm-runners directory by pulling from Git",
Long: `Update the local evm-runners directory by pulling from Git.
Note that this command does not update the evm-runners-cli binary, for that you need to
run 'evmrup'.`,

RunE: func(cmd *cobra.Command, args []string) error {
// load config
config, err := utils.LoadConfig()
Expand Down
14 changes: 6 additions & 8 deletions cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ import (
// validateCmd represents the validate command
var validateCmd = &cobra.Command{
Use: "validate <level>",
Short: "Validate a level",
Long: `Validate a level by running the predefined Foundry tests
against the solution file or against the provided bytecode,
if the bytecode '-b' flag is set.
The resulting codesize score is determined by the result
of 'test_<level_id>_size', and the gas score is determined
by the µ value of the 'test_<level_id>_gas' fuzz test.`,
Short: "Run predefined Foundry tests to validate a level",
Long: `Validate a level by executing preconfigured Foundry tests on either the solution
file or the provided bytecode (if '-b' flag is set).
The resulting codesize score is based on the 'test_<level_id>size' outcome, while the gas
score is derived from the µ value in the 'test<level_id>_gas' fuzz test.`,

RunE: func(cmd *cobra.Command, args []string) error {
bytecode, _ := cmd.Flags().GetString("bytecode")
Expand Down

0 comments on commit 000e41d

Please sign in to comment.