How to update multiple instances of the same contract?

Hello @dmihal! If you are using the command-line interface and you want to upgrade a group of instances that point to the same implementation, just running zos update InstanceName -n some_network (after running a zos push -n some_network to redeploy the implementation) should do the trick, as zos will look for all the instances that match the provided name.

If you are using the programmatic API (i.e., zos-lib), you won’t be able to upgrade them all in one method call, but you can iterate through the list of instances and upgrade one at a time. If you want to access rapidly to a list of instances, I suggest you to take a look at this.

Finally, the same goes when trying to update your instances through solidity; you will have to iterate through them and call your custom function (whether using zos-lib to wrap your contract or truffle/web3) that is in charge of upgrading them.

1 Like