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

Can't create DAO with single coin [Bug] #16469

Closed
danieljperry opened this issue Oct 2, 2023 · 1 comment
Closed

Can't create DAO with single coin [Bug] #16469

danieljperry opened this issue Oct 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@danieljperry
Copy link
Contributor

What happened?

When creating a DAO, the wallet must hold two coins: One to create the DAO, and one to mint the DAO CATs. This is an issue because I would expect most new DAOs to be created from a new wallet, which would receive a single coin from another wallet.

For example, the following command to create a DAO:

chia dao create --proposal-timelock 10 --soft-close 2 --attendance-required 1000 --pass-percentage 5000 --self-destruct 10 --oracle-delay 5 --proposal-minimum 0.000001 --filter-amount 1 --cat-amount 100000 -m 0.00001 --fee-for-cat 0.00001

Will fail with this error if only one coin is present:

Exception from 'wallet' {'error': 'Transaction for 100000 is greater than spendable balance of 0. There may be other transactions pending or our minimum coin amount is too high.', 'success': False}

I will document this on our website, but it would be better if either:

  1. The error message could be more specific that another coin is required, or
  2. (better) The DAO could automatically (or maybe prompt to) split the coin prior to creating the DAO, or
  3. Create the DAO first, wait for change, and then create the DAO CATs

Version

2.0.1b3.dev316 (dao-wallet branch)

What platform are you using?

Windows

What ui mode are you using?

CLI

Relevant log output

No response

@danieljperry danieljperry added the bug Something isn't working label Oct 2, 2023
geoffwalmsley added a commit that referenced this issue Oct 5, 2023
@danieljperry
Copy link
Contributor Author

Testing on main, this does give a more meaningful error:
ValueError: DAO creation requires at least 2 xch coins in your wallet.
Ideally in a future version, if there is only one coin, it would automatically be split into two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants