refactor: const string contract methods#2141
Conversation
…/mpc into simon/const-string-contract-methods
|
@DSharifi, I discovered locally that I do not have jq and ruff packages installed while running locally |
|
In this PR, I tackled hopefully all the contract methods (including the one where #[private] is mentioned above). |
|
Review: refactor: const string contract methods Clean refactor - centralizing method name strings into contract_interface::method_names is a good improvement for maintainability. Minor issue (non-blocking): Two "propose_update" string literals were missed:
The constant values in method_names.rs are correct and match the actual contract function names. The README fix (start_resharing_instance to start_reshare_instance) correctly reflects the actual method name. No critical issues found. Approved. |
gilcu3
left a comment
There was a problem hiding this comment.
Thank you!
My only suggestion is to use the new const directly in crates/node/src/indexer.rs
|
I went manually through all the functions and added constants. Some are not used but still chose to add the corresponding constant (e.g. VERSION). This is only to allow a better visibility over the API |
|
@claude review |
|
Review: refactor: const string contract methods No critical issues found. This is a clean mechanical refactor centralizing contract method name strings into ✅ Approved |
Closes #2140 and #950