1

Obviously the first answer is to try to avoid running into this scenario by having some flexibility in storing additional fields using maps (example). However, let's think about the scenario where this wasn't done.

Say you need additional storage for something and that wasn't built into the original contract and upgrading the contract using lambdas or a delegate isn't possible because the new storage fields need to be under a specific contract.

How would a migration for the existing data look like? Is it feasible to this without giving the admin developer too much power?

1

You could do something like this:

enter image description here

Or just store upgradable structures as bytes and lambdas to unpack/pack and process those bytes. (Expensive and doesn't work with big maps)

Is it feasible to this without giving the admin developer too much power?

No, having an upgradable contract means that the contract can change its behavior to do unintended things. But you could have a multisig admin when multiple entities are involved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.