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

BUG: Removing objects from a dictionary does not load value correctly. #128

Closed
joshuahannan opened this issue May 22, 2020 · 0 comments
Closed
Assignees
Labels
Bug Something isn't working

Comments

@joshuahannan
Copy link
Member

Problem

Objects are not being loaded correctly from a dictionary after it has been stored.

Steps to Reproduce

  1. Pull the josh/bugFix branch from the NFT repo:
    https://github.com/onflow/flow-nft/tree/josh/bugFix
  2. Run go test -v in the nfttests directory.
  3. See that there is an error that says missing NFT
  4. We use the simple contract SimpleNFT.cdc. At deployment time, the contract withdraws and deposits token index 1 from the dictionary to make sure that is working. Then in the GenerateDestroyScript in nft_templates.go, we load the collection from storage and try to withdraw with causes the missing NFT error. We had also gotten the error from borrowing a reference to the collection.

Acceptance Criteria

This test case must pass.

Context

This makes it impossible to withdraw an NFT from a collection, so it blocks testing of the topshot contracts on the testnet

@joshuahannan joshuahannan added Bug Something isn't working Language Breaking Change Breaks Cadence contracts deployed on Mainnet labels May 22, 2020
@turbolent turbolent removed the Language Breaking Change Breaks Cadence contracts deployed on Mainnet label May 22, 2020
SupunS added a commit that referenced this issue Jul 11, 2023
[v0.39] Add support for max parameter count (internal #128)
SupunS added a commit that referenced this issue Jul 12, 2023
Add support for max parameter count (internal #128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants