This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
contracts: Simplify instantiate_with_code
logic
#14494
Labels
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Right now, we implement some optimizations when a code is uploaded and instantiation at the same time. That adds a lot of complexity to our code. The right move would be to only support
instantiate
andupload_code
and let users usebatch_all
if they want to bundle them. It would massively simplify our code.That said, we can't remove the
instantiate_with_code
dispatchable for backwards compatibility. But we can refactor it to just emulatebatch_all
by doingupload_code
andinstantiate
back to back in a storage transaction.The text was updated successfully, but these errors were encountered: