Skip to content

Commit 3cb8deb

Browse files
committed
add more deprecation notice
1 parent d5fa3f8 commit 3cb8deb

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

cmd/convert/display_balance.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package convert
22

33
import (
44
"fmt"
5+
"github.com/bcdevtools/devd/v2/constants"
56
"math/big"
67
"os"
78
"strconv"
@@ -14,12 +15,14 @@ import (
1415
func GetDisplayBalanceCmd() *cobra.Command {
1516
cmd := &cobra.Command{
1617
Use: "display_balance [raw balance] [decimals]",
17-
Aliases: []string{"dbal"},
18+
Aliases: []string{"dbal", "display-balance"},
1819
Short: "Convert raw balance into display balance.",
1920
Long: `Convert raw balance into display balance.
2021
Sample: 10011100 with 6 exponent => 10.0111`,
2122
Args: cobra.ExactArgs(2),
2223
Run: func(cmd *cobra.Command, args []string) {
24+
utils.PrintfStdErr("WARN: from v3, this command will be renamed to `%s convert display-balance` (`-` instead of '_')\n", constants.BINARY_NAME)
25+
2326
rawBalanceStr := args[0]
2427
decimalsStr := args[1]
2528

cmd/convert/raw_balance.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package convert
22

33
import (
44
"fmt"
5+
"github.com/bcdevtools/devd/v2/constants"
56
"os"
67
"strconv"
78

@@ -18,12 +19,14 @@ const (
1819
func GetRawBalanceCmd() *cobra.Command {
1920
cmd := &cobra.Command{
2021
Use: "raw_balance [display balance] [decimals]",
21-
Aliases: []string{"rbal"},
22+
Aliases: []string{"rbal", "raw-balance"},
2223
Short: "Convert display balance into raw balance.",
2324
Long: `Convert display balance into raw balance.
2425
Sample: 10.0111 with 6 exponent => 10011100`,
2526
Args: cobra.ExactArgs(2),
2627
Run: func(cmd *cobra.Command, args []string) {
28+
utils.PrintfStdErr("WARN: from v3, this command will be renamed to `%s convert raw-balance` (`-` instead of '_')\n", constants.BINARY_NAME)
29+
2730
displayBalanceStr := args[0]
2831
decimalsStr := args[1]
2932

cmd/convert/solc_sig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Output will be 4 lines:
2727
`,
2828
Args: cobra.MinimumNArgs(1),
2929
Run: func(cmd *cobra.Command, args []string) {
30-
utils.PrintfStdErr("WARN: from v3, this command will be renamed to `%s convert solc-sig ...`\n", constants.BINARY_NAME)
30+
utils.PrintfStdErr("WARN: from v3, this command will be renamed to `%s convert solc-sig` (`-` instead of '_')\n", constants.BINARY_NAME)
3131

3232
_interface := strings.Join(args, " ")
3333

cmd/debug/intrinsic_gas.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package debug
33
import (
44
"encoding/hex"
55
"fmt"
6+
"github.com/bcdevtools/devd/v2/constants"
67
"os"
78
"regexp"
89
"strings"
@@ -16,8 +17,9 @@ import (
1617

1718
func GetIntrinsicCommand() *cobra.Command {
1819
cmd := &cobra.Command{
19-
Use: "intrinsic_gas [0xdata]",
20-
Short: `Get intrinsic gas used by the given EVM transaction input data.`,
20+
Use: "intrinsic_gas [0xdata]",
21+
Aliases: []string{"intrinsic-gas"},
22+
Short: `Get intrinsic gas used by the given EVM transaction input data.`,
2123
Long: fmt.Sprintf(`Get intrinsic gas used by the given EVM transaction input data.
2224
This operation assumes:
2325
- No access list
@@ -26,6 +28,8 @@ This operation assumes:
2628
- The transaction is not a contract creation transaction, if it is, need to plus %d into the output to have the correct number`, params.TxGasContractCreation-params.TxGas),
2729
Args: cobra.ExactArgs(1),
2830
Run: func(_ *cobra.Command, args []string) {
31+
utils.PrintfStdErr("WARN: from v3, this command will be renamed to `%s convert intrinsic-gas` (`-` instead of '_')\n", constants.BINARY_NAME)
32+
2933
input := strings.ToLower(args[0])
3034
if !regexp.MustCompile(`^(0x)?[a-f\d]+$`).MatchString(input) {
3135
utils.PrintlnStdErr("ERR: invalid EVM transaction input data format")

0 commit comments

Comments
 (0)