kisstron

KISS-friendly Tron CLI wallet
git clone git://git.luxferre.top/kisstron.git
Log | Files | Refs | README

commit e29c9f0ad8f87fcd949e0dee38c64d93c9350fa6
parent b72f7f1b643e03f9b9ba0e0bd87077b78647acf9
Author: Luxferre <lux@ferre>
Date:   Thu, 15 Feb 2024 19:29:48 +0200

implemented fee limit customization

Diffstat:
MREADME | 2++
Mkisstron.py | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -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. diff --git a/kisstron.py b/kisstron.py @@ -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