Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add withdraw subtask to account task #48

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

havan
Copy link
Member

@havan havan commented Nov 21, 2024

This PR adds a withdraw subtask for the account task that can be used to call withdraw function of a CM Account.

@VjeraTurk
Copy link

VjeraTurk commented Nov 25, 2024

@havan

Is it possible to somehow check the maximum withdrawable amount?

Can you also add the unit to the description of Amount to withdraw

OPTIONS:

  --amount      Amount to withdraw 
  --cm-account  CMAccount address, default: CMACCOUNT_ADDRESS env variable 
  --private-key Private key to use, default: CMACCOUNT_PK env variable 
  --recipient   Recipient address 

withdraw: Withdraw funds from CMAccount

tasks/account.js Outdated Show resolved Hide resolved
@havan
Copy link
Member Author

havan commented Nov 26, 2024

Is it possible to somehow check the maximum withdrawable amount?

Not easily. We need to update the logic of the CM Account implementation.

Also, after the prefund amount is spent, then the max withdrawable amount is always the balance of the CM Account. So, I don't see a reason to implement this.

Can you also add the unit to the description of Amount to withdraw

I've added the unit param. Default is aCAM (wei) if no --unit param is given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants