Skip to content

Commit

Permalink
fixed default gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
jhd2best committed Feb 1, 2022
1 parent 86206d8 commit e59f6c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmd/subcommands/ethtransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func ethHandlerForBulkTransactions(txLog *transactionLog, index int) error {
if txnFlags.GasPrice != nil {
gasPrice = *txnFlags.GasPrice
} else {
gasPrice = "30000" // Reset to default for subsequent transactions
gasPrice = "30" // Reset to default for subsequent transactions
}
if txnFlags.GasLimit != nil {
gasLimit = *txnFlags.GasLimit
Expand Down Expand Up @@ -271,7 +271,7 @@ Create an Ethereum compatible transaction, sign it, and send off to the Harmony
cmdEthTransfer.Flags().BoolVar(&dryRun, "dry-run", false, "do not send signed transaction")
cmdEthTransfer.Flags().BoolVar(&trueNonce, "true-nonce", false, "send transaction with on-chain nonce")
cmdEthTransfer.Flags().StringVar(&amount, "amount", "0", "amount to send (ONE)")
cmdEthTransfer.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay (NANO)")
cmdEthTransfer.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay (NANO)")
cmdEthTransfer.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
cmdEthTransfer.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for tx")
cmdEthTransfer.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down
10 changes: 5 additions & 5 deletions cmd/subcommands/staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ Create a new validator"
)
subCmdNewValidator.Flags().StringVar(&blsPubKeyDir, "bls-pubkeys-dir", "", "directory to bls pubkeys storing pub.key, pub.pass files")
subCmdNewValidator.Flags().StringVar(&stakingAmount, "amount", "0.0", "staking amount")
subCmdNewValidator.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay")
subCmdNewValidator.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay")
subCmdNewValidator.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
subCmdNewValidator.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for transaction")
subCmdNewValidator.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down Expand Up @@ -633,7 +633,7 @@ Create a new validator"
subCmdEditValidator.Flags().StringVar(&slotKeyToRemove, "remove-bls-key", "", "remove BLS pubkey from slot")
subCmdEditValidator.Flags().StringVar(&active, "active", "", "validator active true/false")

subCmdEditValidator.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay")
subCmdEditValidator.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay")
subCmdEditValidator.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
subCmdEditValidator.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for transaction")
subCmdEditValidator.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down Expand Up @@ -698,7 +698,7 @@ Delegating to a validator
subCmdDelegate.Flags().Var(&delegatorAddress, "delegator-addr", "delegator's address")
subCmdDelegate.Flags().Var(&validatorAddress, "validator-addr", "validator's address")
subCmdDelegate.Flags().StringVar(&stakingAmount, "amount", "0", "staking amount")
subCmdDelegate.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay")
subCmdDelegate.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay")
subCmdDelegate.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
subCmdDelegate.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for transaction")
subCmdDelegate.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down Expand Up @@ -765,7 +765,7 @@ Delegating to a validator
subCmdUnDelegate.Flags().Var(&delegatorAddress, "delegator-addr", "delegator's address")
subCmdUnDelegate.Flags().Var(&validatorAddress, "validator-addr", "source validator's address")
subCmdUnDelegate.Flags().StringVar(&stakingAmount, "amount", "0", "staking amount")
subCmdUnDelegate.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay")
subCmdUnDelegate.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay")
subCmdUnDelegate.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
subCmdUnDelegate.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for transaction")
subCmdUnDelegate.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down Expand Up @@ -820,7 +820,7 @@ Collect token rewards

subCmdCollectRewards.Flags().BoolVar(&trueNonce, "true-nonce", false, "send transaction with on-chain nonce")
subCmdCollectRewards.Flags().Var(&delegatorAddress, "delegator-addr", "delegator's address")
subCmdCollectRewards.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay")
subCmdCollectRewards.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay")
subCmdCollectRewards.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
subCmdCollectRewards.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for tx")
subCmdCollectRewards.Flags().StringVar(&targetChain, "chain-id", "", "what chain ID to target")
Expand Down
4 changes: 2 additions & 2 deletions cmd/subcommands/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func handlerForBulkTransactions(txLog *transactionLog, index int) error {
if txnFlags.GasPrice != nil {
gasPrice = *txnFlags.GasPrice
} else {
gasPrice = "30000" // Reset to default for subsequent transactions
gasPrice = "30" // Reset to default for subsequent transactions
}
if txnFlags.GasLimit != nil {
gasLimit = *txnFlags.GasLimit
Expand Down Expand Up @@ -409,7 +409,7 @@ Create a transaction, sign it, and send off to the Harmony blockchain
cmdTransfer.Flags().BoolVar(&offlineSign, "offline-sign", false, "output offline signing")
cmdTransfer.Flags().BoolVar(&trueNonce, "true-nonce", false, "send transaction with on-chain nonce")
cmdTransfer.Flags().StringVar(&amount, "amount", "0", "amount to send (ONE)")
cmdTransfer.Flags().StringVar(&gasPrice, "gas-price", "30000", "gas price to pay (NANO)")
cmdTransfer.Flags().StringVar(&gasPrice, "gas-price", "30", "gas price to pay (NANO)")
cmdTransfer.Flags().StringVar(&gasLimit, "gas-limit", "", "gas limit")
cmdTransfer.Flags().StringVar(&inputNonce, "nonce", "", "set nonce for tx")
cmdTransfer.Flags().Uint32Var(&fromShardID, "from-shard", 0, "source shard id")
Expand Down

0 comments on commit e59f6c2

Please sign in to comment.