Obtaining the canister module size

I can find out a canister’s wasm module hash in various ways (dashboard, calling canister_info by anyone, calling canister_status by the controller, etc.). Is there also a way to find out the size of a canister’s wasm module?

In canister_status I can see the total memory used by a canister which will be at least the size of the wasm module but usually larger.

A recent change added this information to canister_status endpoint. It’s likely not available yet in CDKs but the mainnet IC should return this information.

I see thanks. I wasn’t aware of the change and relied on dfx’s build-in status command which doesn’t display it yet (0.25.0).

1 Like