Upload new code without instantiating a contract from it.
If the code does not already exist a deposit is reserved from the caller
The size of the reserve depends on the size of the supplied code.
Note
Anyone can instantiate a contract from any uploaded code and thus prevent its removal.
To avoid this situation a constructor could employ access control so that it can
only be instantiated by permissioned entities. The same is true when uploading
through [Self::instantiate_with_code].
If the refcount of the code reaches zero after terminating the last contract that
references this code, the code will be removed automatically.
Upload new
codewithout instantiating a contract from it.If the code does not already exist a deposit is reserved from the caller The size of the reserve depends on the size of the supplied
code.Note
Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [
Self::instantiate_with_code].If the refcount of the code reaches zero after terminating the last contract that references this code, the code will be removed automatically.