-
Notifications
You must be signed in to change notification settings - Fork 26
Fix proposal management #1285
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
base: master
Are you sure you want to change the base?
Fix proposal management #1285
Conversation
…d interactive CLI
Hi @miraclx , I had closed the previous PR due to multiple changes in the main codebase , so I had made this new PR kindly look into it and review |
let _ = self | ||
.get_proposal_approvers( | ||
environment, | ||
multiaddr, | ||
&client, | ||
&config.identity, | ||
context_id, | ||
proposal_id, | ||
) | ||
.await; | ||
|
||
let _ = self | ||
.get_number_of_proposal_approvals( | ||
environment, | ||
multiaddr, | ||
&client, | ||
&config.identity, | ||
context_id, | ||
proposal_id, | ||
) | ||
.await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aren't these results?
don't use let _ =
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was calling these functions along with the results that there result also gets printed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated it now though kindly check
Ok(_) => { | ||
self.get_proposal_approvers( | ||
environment, | ||
multiaddr, | ||
&client, | ||
&config.identity, | ||
context_id, | ||
proposal_id, | ||
) | ||
.await?; | ||
|
||
self.get_number_of_proposal_approvals( | ||
environment, | ||
multiaddr, | ||
&client, | ||
&config.identity, | ||
context_id, | ||
proposal_id, | ||
) | ||
.await?; | ||
|
||
Ok(()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this supposed to do? it's way too complicated for such a simple thing
according to the logic of the methods you're calling, you shouldn't need a match here at all
get_proposal(..)?;
get_proposal_approvers(..)?;
but can you actually test this? you can use the app from https://github.com/calimero-network/demo-blockchain-integrations/releases/tag/pre-release-f0b2a9ec577e15f85f08526d46d32b5b9db06f1f
please include screenshots of what this looks like, this is required for this to get merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't knew what all things exactly required to be displayed so I just included whatever make sense to me .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi , @miraclx can you tell like how to text them exactly like I have installed the above app , build its logic and use that wasm to create application and then creating context but I am not getting proposals output from it .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add proposal management capabilities to interactive CLI
Description
This PR adds support for proposal management operations to the node's interactive CLI by implementing a
ProposalManager
that provides a clean interface for proposal-related operations.Fixes #1071
Key changes:
ProposalManager
struct that wrapsContextManager
for proposal operationsget_number_of_proposal_approvals
get_proposal_approvers
get_active_proposals_count
get_proposals
get_proposal
proxy
command in the interactive CLI to expose these operations to usersThis implementation follows the same pattern as other commands in the CLI and provides consistent error handling and output formatting.
Test plan
Tested by manually running the commands in the interactive CLI:
Documentation update
The internal documentation for the node CLI should be updated to include the new
proxy
command and its subcommands.