Emit compiler warning/error if a permission specifies unused method #982

Open
opened 2025-12-28 17:14:50 +00:00 by sami · 1 comment
Owner

Originally created by @fyrchik on GitHub (Sep 7, 2022).

See https://github.com/nspcc-dev/neofs-contract/pull/265
We can do this if all callsites have constant method names. This should cover 99% of our cases.

Depending on the implementation of https://github.com/neo-project/neo/pull/2756, these warnings could become even more important.

Originally created by @fyrchik on GitHub (Sep 7, 2022). See https://github.com/nspcc-dev/neofs-contract/pull/265 We can do this if all callsites have constant method names. This should cover 99% of our cases. Depending on the implementation of https://github.com/neo-project/neo/pull/2756, these warnings could become even more important.
Author
Owner

@roman-khimov commented on GitHub (Sep 9, 2022):

Not sure about this one. When we see a call with clear hash/method combination and can't find a matching permission it's 100% accurate easily detectable error, but it's not the same the other way around. If "all callsites have constant method names" maybe, but even then we have */method permissions that can be too broad in some scenarios.

@roman-khimov commented on GitHub (Sep 9, 2022): Not sure about this one. When we see a call with clear hash/method combination and can't find a matching permission it's 100% accurate easily detectable error, but it's not the same the other way around. If "all callsites have constant method names" maybe, but even then we have `*/method` permissions that can be too broad in some scenarios.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#982
No description provided.