You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've received several requests for a feature that enables users to unstake all keys on a disk and transfer their balances to a specified address. This feature aims to simplify the management of multiple wallet addresses.
Example that Huck sent (applied to the commune repository logic):
importargparseimportcommuneasc# Set up command-line argument parsingparser=argparse.ArgumentParser(description='Transfer all balance to a specific address.')
parser.add_argument('--address', type=str, help='The address to transfer to.')
parser.add_argument('--min', type=float, default=0.5, help='Min stake amount to left. Default is 0.5.')
# Parse command-line argumentsargs=parser.parse_args()
wallet_addresses=c.keys()
print(wallet_addresses)
foraddressinwallet_addresses:
try:
# Unstake all balance from the walletstaked=c.get_stake(address)
print(f"Staked amount is {staked}")
if (staked>0):
c.unstake(staked, address)
# Transfer all balance to the specific addressbalance=c.get_balance(address)
print(f"Total balance is {balance}")
if (balance>args.min):
c.transfer(args.address, balance-args.min, address)
exceptExceptionase:
# Code that will run if the exception is raisedprint(f"An error occurred: {e}")```
Discussion and Feedback:
We are looking to the community for feedback on this feature. Please share your thoughts, potential use cases, or suggestions to improve this feature. Your input is valuable in shaping this enhancement to better suit user needs.
The text was updated successfully, but these errors were encountered:
Enhanced transferring features
Background
We've received several requests for a feature that enables users to unstake all keys on a disk and transfer their balances to a specified address. This feature aims to simplify the management of multiple wallet addresses.
Example that Huck sent (applied to the commune repository logic):
Discussion and Feedback:
We are looking to the community for feedback on this feature. Please share your thoughts, potential use cases, or suggestions to improve this feature. Your input is valuable in shaping this enhancement to better suit user needs.
The text was updated successfully, but these errors were encountered: