Breaking Change: Bugfix for Cadence Resource Owner Field

We want to remind you that a bugfix for Cadence’s resource owner field is going to be deployed to Mainnet in the upcoming 2021-12-08 spork.

As announced in the latest Cadence release notes, the field’s value was not correctly unset after a resource was moved out of storage.

This is breaking change that could impact your development team if your Cadence programs (contracts, transactions, scripts) depend on the incorrect behaviour.

This change is currently deployed on Testnet and available in the latest Emulator version 0.26.0.

Who/What This Impacts

  • This impacts Cadence programs (contracts, transactions, scripts)
  • Cadence previously kept the resource owner field set to the most recent account the resource was stored in.
  • This was an incorrect implementation. The implementation was corrected so that the owner field now always correctly reflects the current owner of the resource, the account in which the resource is stored in (directly or transitively).

Why This Change Happened

  • The change happened as a bugfix of the current incorrect behaviour, as part of the refactor of Cadence storage layer

Action Required

  • Generally, there is no action required.
  • If you notice your Cadence programs (contracts, transactions, scripts) failing or misbehaving,
    or e.g. events having missing information, check the usage of the resource owner field in your programs.

Note that the field is always nil for resources not currently in storage. See the Cadence release notes for an example of an incorrect program.

If you have any questions regarding this breaking change, please ask our team in Discord for further assistance.

Thank you