The get_resource_address()
view function recreates the signer from the capability on every call instead of storing the resource address directly in ModuleData
. Since the resource account address never changes after initialization, this approach wastes gas unnecessarily.
The function recreates the signer every time to get its address:
Unnecessary gas consumption on every view function call
Inefficient pattern that could be avoided with simple storage optimization
Store the resource address directly in ModuleData
during initialization:
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.