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

Conditions No Longer Allow State Changes #553

Open
Tracked by #531
nialexsan opened this issue Feb 8, 2024 · 1 comment
Open
Tracked by #531

Conditions No Longer Allow State Changes #553

nialexsan opened this issue Feb 8, 2024 · 1 comment
Assignees

Comments

@nialexsan
Copy link
Collaborator

nialexsan commented Feb 8, 2024

check all prepare and post conditions to not to mutate state, like here(?)

    post {
        self.recipientCollectionRef.getIDs().contains(self.mintingIDBefore): "The next NFT ID should have been minted and delivered"
        ExampleNFT.totalSupply == self.mintingIDBefore + 1: "The total supply should have been increased by 1"
    }
@joshuahannan
Copy link
Member

@nialexsan Can you elaborate on what you mean to fix here? I don't think Cadence allows state changes in pre and post conditions anyway. Do you mean to remove all instances of this in the docs site?

@joshuahannan joshuahannan moved this to 🔖 Ready for Pickup in 🌊 Flow 4D Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants