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

feat: Add support for submitting DAO proposals #197

Open
frol opened this issue May 21, 2023 · 0 comments
Open

feat: Add support for submitting DAO proposals #197

frol opened this issue May 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@frol
Copy link
Collaborator

frol commented May 21, 2023

Currently, commands like near tokens xxx.near send-near prepare a transaction with native actions such as TRANSFER or FUNCTION_CALL to FT contract. I tried to integrate DAO commands right into the existing commands, but with DAO we have two different accounts (DAO contract account id, and signer account id) in addition to a receiver account id (if applicable).

Here is the current command to send NEAR:

near tokens sender.near send-near receiver.near 10N network-config mainnet

If I just try to "send tokens from DAO", there is no way to specify who will be signing the transaction:

near tokens dao.near send-near receiver.near 10N network-config mainnet

So my natural first attempt was:

near dao devdao.near tokens send-near receiver.near 10N sign-as signer.near network-config mainnet

Though, it might mislead users that this command will actually send the tokens while it is only intended to submit a new proposal to the DAO with a TRANSFER action, which will only be executed when the proposal is confirmed. So second thought is to introduce submit-proposal and confirm-proposal commands:

near dao devdao.near submit-proposal send-near receiver.near 10n sign-as signer.near network-config mainnet

The problem I hate to admit is that we won't be able to reuse existing commands, so send-near, send-ft, send-nft, function-call as-transaction, deploy, account manage-storage-deposit deposit / withdraw commands will need to be re-implemented, and it is even more painful if we take extensions into account, e.g. bos CLI components deployment, permissions and prepaid storage management would need to be re-implemented for DAO as well.

At least DAO proposal confirmation seems to be quite straightforward:

near dao devdao.near confirm-proposal 123 gas-attached 200TGAS sign-as signer.near network-config mainnet

I would love to spend more time thinking about how to avoid code duplication, so this issue is just a placeholder for now.

@frol frol added the enhancement New feature or request label May 21, 2023
@frol frol changed the title feat: Add support for submitting common actions as DAO proposals feat: Add support for submitting DAO proposals May 21, 2023
@github-project-automation github-project-automation bot moved this to NEW❗ in DevTools Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: NEW❗
Development

No branches or pull requests

1 participant