implemented fee limit customization
This commit is contained in:
@@ -80,6 +80,8 @@ be added and are quite important:
|
||||
* -net selects the network: mainnet (default), nile, shasta
|
||||
* -node allows to specify custom Tron node URL (must be HTTP URL, not RPC)
|
||||
* -tgkey allows to specify custom TronGrid API key (overrides -node)
|
||||
* -fee allows to set custom transaction fee limit (in TRX, 100 by default) if
|
||||
operating on the mainnet (relevant for send, fre and unf subcommands)
|
||||
|
||||
These options will be marked as [netopts] in the further reference.
|
||||
|
||||
|
||||
@@ -451,6 +451,7 @@ if __name__ == '__main__': # main app start
|
||||
parser.add_argument('-net', '--network', default='mainnet', help='(op: all) Network: mainnet (default), nile, shasta')
|
||||
parser.add_argument('-node', '--tron-node', default=NODE_ADDR, help='(op: all) Custom Tron node HTTP address (default %s)' % NODE_ADDR)
|
||||
parser.add_argument('-tgkey', '--trongrid-api-key', default=None, help='(op: all) TronGrid API key (default None)')
|
||||
parser.add_argument('-fee', '--fee-limit', type=float, default=100.0, help='(op: send, fre, unf) Custom fee limit for mainnet transactions, in TRX (default 100)')
|
||||
parser.add_argument('-addr', '--address', default=None, help='(op: info, send) Tron address to send to or display information about (-pk overrides this to display own info)')
|
||||
parser.add_argument('-amt', '--amount', type=float, default=0, help='(op: send, fre, unf) Amount to send/freeze/unfreeze')
|
||||
parser.add_argument('-pk', '--private-key', default=None, help='(op: info, send, fre, unf) Private key for transactions or own information, in hex')
|
||||
@@ -475,6 +476,7 @@ if __name__ == '__main__': # main app start
|
||||
trans_confirm = True # ask for transaction confirmation ("yes")
|
||||
NODE_ADDR = args.tron_node # custom Tron node HTTP address
|
||||
TG_API_KEY = args.trongrid_api_key # optional TronGrid API key
|
||||
KT_FEE_LIMIT = int(args.fee_limit * TRX_SCALE) # custom fee limit
|
||||
offline_mode = False # offline mode
|
||||
if args.offline == True:
|
||||
offline_mode = True
|
||||
|
||||
Reference in New Issue
Block a user