ArkProjectNFTs / bridge

The ArkProject Bridge: seamless transfer of NFTs between ETH L1 & Starknet L2. Smart contracts, user-friendly interface, secure & efficient solution. Experience the future of NFT ownership today
https://bridge.arkproject.dev
Apache License 2.0
23 stars 20 forks source link

Fixup of escrow clearing after withdrawing, added tests to check #246

Closed od-hunter closed 1 month ago

od-hunter commented 1 month ago

Resolves #226

vercel[bot] commented 1 month ago

@od-hunter is attempting to deploy a commit to the Screenshot Team on Vercel.

A member of the Team first needs to authorize it.

ptisserand commented 1 month ago

With starknet-foundry 0.19.0, you can directly query storage with the following:

    use snforge_std::{load, map_entry_address};
    let escrowed = load(bridge_address, map_entry_address(selector!("escrow"), array![erc721b_address.into(), 0, 0].span()), 1);

For details see https://book.cairo-lang.org/ch14-01-01-storage-mappings.html and https://docs.starknet.io/architecture-and-concepts/cryptography/hash-functions/#array_hashing

od-hunter commented 1 month ago

@ptisserand Just did a fix , tests are passing on my end.

od-hunter commented 1 month ago

@ptisserand , thanks for the opportunity ser🫡