The main purpose of the function is to check if a given user's address is present in the system's registry and return a simple true or false answer.
In the Move language, a function's final expression is its return value, but a semicolon terminates the expression, turning it into a statement that does not return a value. This causes a compilation error because the function is declared to return a bool
but has no return value.
Likelihood:
It is certain as this is not a probabilistic risk; it is a certainty. The code, as written, will fail to compile in the Move language. The compiler will throw an error because the function signature promises to return a bool
value, but the function body does not return anything.
Impact:
The impact of this bug is high because it completely blocks the deployment and functionality of the entire smart contract.
This is the unit test demonstrating the bug in the function.
The issue can be mitigated by adding the return keyword
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.