Skip to content

feat(cast): consolidate conversion commands #12500

@0xClandestine

Description

@0xClandestine

Component

Cast

Describe the feature you would like

Motivation

Cast is getting bloated with excessive conversion commands, increasing cognitive load when trying to remember/find the right one.

Proposal

Create a cast convert subcommand to group all conversion-related commands, similar to how cast wallet groups wallet operations.

Before:

cast to-wei 1 ether
cast from-utf8 "hello"

After:

cast convert to-wei 1 ether
cast convert from-utf8 "hello"

Additional context

Proposed (26) commands to consolidate under cast convert

  • from-wei, to-wei, to-unit
  • from-fixed-point, to-fixed-point
  • format-units, parse-units
  • to-hex, to-dec, to-base
  • to-int256, to-uint256
  • from-utf8, to-utf8, to-ascii, from-bin
  • to-bytes32, to-hexdata
  • format-bytes32-string, parse-bytes32-string, parse-bytes32-address
  • to-check-sum-address, concat-hex, pad
  • to-rlp, from-rlp

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions