@@ -27,10 +27,10 @@ Support short int`,
2727 Run : func (cmd * cobra.Command , args []string ) {
2828 ethClient8545 , _ := flags .MustGetEthClient (cmd )
2929
30- gasPrices , err := readGasPrices (cmd )
30+ gasPrices , err := flags . ReadFlagGasPrices (cmd , flags . FlagGasPrices , 20_000_000_000 )
3131 utils .ExitOnErr (err , "failed to parse gas price" )
3232
33- gasLimit , err := readGasLimit (cmd )
33+ gasLimit , err := flags . ReadFlagGasLimit (cmd , flags . FlagGasLimit , 500_000 )
3434 utils .ExitOnErr (err , "failed to parse gas limit" )
3535
3636 evmAddrs , err := utils .GetEvmAddressFromAnyFormatAddress (args [0 ])
@@ -97,7 +97,7 @@ Support short int`,
9797 }
9898 } else {
9999 if gasLimit > 21000 {
100- utils .PrintfStdErr ("WARN: setting gas limit by flag --%s will be ignored, ony use 21,000 gas\n " , flagGasLimit )
100+ utils .PrintfStdErr ("WARN: setting gas limit by flag --%s will be ignored, ony use 21,000 gas\n " , flags . FlagGasPrices )
101101 }
102102 txData = ethtypes.LegacyTx {
103103 Nonce : nonce ,
@@ -135,8 +135,8 @@ Support short int`,
135135 cmd .Flags ().String (flags .FlagEvmRpc , "" , flags .FlagEvmRpcDesc )
136136 cmd .Flags ().String (flags .FlagSecretKey , "" , flags .FlagSecretKeyDesc )
137137 cmd .Flags ().String (flagErc20 , "" , "contract address if you want to send ERC-20 token instead of native coin" )
138- cmd .Flags ().String (flagGasLimit , "500k" , fmt .Sprintf ("%s. Ignored during normal EVM transfer, fixed to 21k" , flagGasLimitDesc ))
139- cmd .Flags ().String (flagGasPrices , "20b" , flagGasPricesDesc )
138+ cmd .Flags ().String (flags . FlagGasLimit , "500k" , fmt .Sprintf ("%s. Ignored during normal EVM transfer, fixed to 21k" , flagGasLimitDesc ))
139+ cmd .Flags ().String (flags . FlagGasPrices , "20b" , flagGasPricesDesc )
140140 cmd .Flags ().Bool (flagRawTx , false , flagRawTxDesc )
141141
142142 return cmd
0 commit comments