I am following this way, please if you have any better way of doing this, let me know I am a fool
So I have been writing shell script to first convert a .wasm file to .txt file via wabt tool.
After converting it to text, i decided to chunk the wasm text and then upload it to motoko canister, now challenge I am facing: I am trying to upload text format wasm chunks and motoko only acepts raw text. But wasm text contains special characters and formatted text.
So I think this method is surely not gonna work. If anyone have better way to do install_code from a canister to other canister? Please let me know!!
I’ve done this, but with JS. Basically turned the wasm file in my .dfx into an array. Then pass the array to the canister, stored as blob, then install_code gets the stored blob.
Yea I had to chunk it, I sent them 1 at a time and appended them to each other in the backend. You may just need to play with the chunk size, the limitation I ran into was an operating system limitation. I’d be curious to know if there was a way to just increase the tolerance for the OS, because it seems in my case its at least within the message size, so it would be nice to do with just an uploadWasm call opposed to 5x uploadWasmChunks calls.
Hey actually i am aware of this method.
But I have a situation where I have multiple child canisters to which i have to install same wasm file, so i guess i will have to use install_code method only via a parent canister(because parent canister is the only controller of child canisters).
So for that i guess i would have to upload whole wasm file to parent canister first and then use it. Am i right? Or is there any other option as well?