-
Notifications
You must be signed in to change notification settings - Fork 21
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
withdraw_auto_from_l1 escrow is not zeroed #226
Comments
Hi @ptisserand , please can I be assigned this when od hack starts? To solve this issue, I'd take the following steps:
Please assign me. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedPlease can I be assigned this issue? This is my first time applying in this ecosystem and I’d love to be given the opportunity. I am a blockchain Developer, and my experience includes html, css, react, JavaScript,TypeScript and solidity, python and Cairo. How I plan on tackling this issueTo solve this issue, I'd take the following steps: 1. I’ll update withdraw_auto_from_l1() (add logic to reset the escrow mapping after tokens are transferred, ensuring they are no longer recorded in the contract's state). Please assign me. |
The maintainer ptisserand has assigned od-hunter to this issue via OnlyDust Platform. |
Thank you ser🫡 |
Hi @od-hunter any update on this ? |
I’ve started working on it. Will push a pr soon |
From https://codehawks.cyfrin.io/c/2024-07-ark-project/s/177
L2 escrow is not reset when withdrawn.
details
When tokens are deposited on L2 via
deposit_tokens()
, they will be deposited in theescrow
mapping, so when someone transfers back the same NFTs from L1 → L2 to take it from the contract balance, because they already exist.But when they are transferred back to L2,
withdraw_auto_from_l1()
transfers them if they exist in theescrow
mapping, but never resets the mapping when transferring it, this creates confusion that the tokens are still in thebridge.cairo
contract.Unit test must be provided.
The text was updated successfully, but these errors were encountered: