CodeInUse

Error v334 → current 29.26

Cannot remove code because contract instances still use it.

Encountered by: developers

Why This Error Exists

Code can't be removed while instances exist - they need the code to run.

From Chain Metadata

Code removal was denied because the code is still in use by at least one contract.

What This Means

Cannot remove code because contract instances still use it.

Common Causes

  • Trying to remove code while contracts are still deployed
  • Some instances not yet terminated

How to Fix

  • Terminate all contract instances using this code first
  • Wait for deletion queue to process terminated contracts
  • Check CodeInfoOf refcount

Storage to Check

Runtime Info

Pallet Index
29
Error Index
26
Error Code
29.26
Runtime Version
v393