I will probably try this in the morning, but curious if you can call install_code from a canister on that very same canister.
If possible this would be a more elegant way to overcome the Wasm binary limit when using an intermediate canister to deploy, rather than spinning up a new canister.
So is this possible?
I can confirm that this works, though it seems that the management_canister cross-canister call will not return properly, because by the time the callback needs to be called the binary has been swapped out:
Here’s the error on the call:
test install code failed Error: Call was rejected:
Request ID: ac554f907515de6d3df2287106350bf933511aa6489ba4aca66c8628de3b3a43
Reject code: 5
Reject text: Canister rrkah-fqaaa-aaaaa-aaaaq-cai requested to invoke a non-existent Wasm function 2307 from table 0
call_on_cleanup also failed:
Canister rrkah-fqaaa-aaaaa-aaaaq-cai requested to invoke a non-existent Wasm function 2308 from table 0