First time deployments require 100_000_000_000 Cycle to create an empty canister. The second deploy is cheaper because it does not require the creation of an empty canister.
$ dfx deploy --network ic
$ dfx deploy --network ic
- Where is the cost of the second deployment deducted from? Are there any documentations? I could not find it.
- Does the cost of deployment depend on the size of the WASM or the size of the status?
Related: "dfx deploy --with-cycles" does not work as expected
You can see a list of all cycles costs here.
When the canister is created, it costs 0.1T cycles, plus however many cycles you add to it. From then on (even the first dfx deploy
), every cycle is deducted from the canister you’re deploying to. The cost depends on WASM size (because every byte you send to the IC costs a little bit, called ‘ingress byte reception’ in the table), plus the amount of computation you perform in init()
or pre/post_upgrade
(see ‘Ten Update Instructions Execution’ in the table)
Thank you for your reply.
because every byte you send to the IC costs a little bit, called ‘ingress byte reception’ in the table
I see! I did not know that.