Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_avatarV1CirclesStatus do return lastTouched time even if Circles contract get stopped #112

Open
hats-bug-reporter bot opened this issue Sep 17, 2024 · 6 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@hats-bug-reporter
Copy link

Github username: --
Twitter username: --
Submission hash (on-chain): 0xd804576013ecdf0aec67ad9966aef4660d7808b4795dab9cdb1ddf1eab64edb7
Severity: high

Description:
Description
_avatarV1CirclesStatus is responsible for checking the status of circle contract in case if circle contract do not stop it return the circlev1 contract if it exist and the last update time, but when circle contract egt stopped and not exist even in that case the function return last update time with CIRCLES_STOPPED_V1 as address parameter.

 // return the stopped status of the Circles contract, and the last touched time
            return (CIRCLES_STOPPED_V1, lastTouched);

which shouldn't be the case, at this point it should zero as lastTouched as the comment also mention this,

Additionally, return the last touched time of the Circles v1 token (ie. the last time it minted CRC),
     * if the token exists, or zero if it does not.

Their in case of CIRCLES_STOPPED_V1 it returns lastUpdated time, which could result in wrong checked passed under registerhuman function.

This should return 0 instead of lastTouched.

 return (CIRCLES_STOPPED_V1, 0);
@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Sep 17, 2024
@benjaminbollen benjaminbollen added the invalid This doesn't seem right label Sep 17, 2024
@satyam455
Copy link

@benjaminbollen can you leave a comment, why it is invalid?

@satyam455
Copy link

Hey @benjaminbollen since according to comment it mentioned in case token not exist it should return 0 but it do not,
where as it return lastTouched timestamp for both exist token and the token which do not exist.

 * @return address of the Circles contract if it exists and is not stopped, or zero address if no Circles exist
     * or CIRCLES_STOPPED_V1 if the Circles contract is stopped.
     * Additionally, return the last touched time of the Circles v1 token (ie. the last time it minted CRC),
     * if the token exists, or zero if it does not.

@satyam455
Copy link

satyam455 commented Sep 21, 2024

@benjaminbollen can you reply please?? and check again!

@benjaminbollen
Copy link

the comment explicitly says "returns zero for lastTouched if the v1 token DOES NOT EXIST, but return lastTouch in all other cases", which is what it does.

I do not know what to comment on your issue. Maybe re-read the comment yourself?

@benjaminbollen
Copy link

for clarity, your issue itself does not compute to something sensible. So yes, it is invalid

@benjaminbollen
Copy link

maybe it helps for you to clarify that a "stopped token" does not remove the v1 token. It keeps existing, and the lastTouched time is still valuable information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants