-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add a return with the proposal ID created #90
Copy link
Copy link
Open
Description
Feature Request
Describe the Feature Request
I was just submitting a proposal for the first time and after it was successful my first thought was to execute the proposal. But the only way to get the proposal ID is by calling the totalProposalCount() and checking if yours was the last one created. It's more practical to simply return the ID, enhancing the developer experience and frontend integrations.
Describe Preferred Solution
- Add the uint32 proposal ID as a return for submitProposal function.
- Add unchecked for impossible to overflow counter.
function submitProposal( ... ) external returns(uint32) {
. . .
unchecked {
totalProposalCount++;
}
return totalProposalCount;
}
Code Related
| ) external { |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels