一、使用dfx创建canister自定义cycles充值数量

创建 canister 时可以指定给每个canister分配多少cycles,比如分配1T:

dfx deploy --with-cycles=1000000000000

二、可以从不用的canister回收cycles

dfx canister --network=ic stop --all或canisterID
dfx canister --network=ic delete --all或canisterID

三、创建canister的手续费

每个canister的手续费为0.1T cycles,从转移到canister的cycles中自动扣除。

附cycles花费详情表:

Cycles Cost per Transaction (as of July 26, 2021)

TransactionDescriptionAll Application Subnets
Canister CreatedFor creating canisters on a subnet100,000,000,000
Compute Percent Allocated Per SecondFor each percent of the reserved compute allocation (a scarce resource).100,000
Update Message ExecutionFor every update message executed590,000
Ten Update Instructions ExecutionFor every 10 instructions executed when executing update type messages4
Xnet CallFor every inter-canister call performed (includes the cost for sending the request and receiving the response)260,000
Xnet Byte TransmissionFor every byte sent in an inter-canister call (for bytes sent in the request and response)1,000
Ingress Message ReceptionFor every ingress message received1,200,000
Ingress Byte ReceptionFor every byte received in an ingress message2,000
GB Storage Per SecondFor storing a GB of data per second127,000

Cost per Transaction in $USD (as of July 26, 2021)

TransactionDescriptionAll Application Subnets
Canister CreatedFor creating canisters on a subnet$0.142
Compute Percent Allocated Per SecondFor each percent of the reserved compute allocation (a scarce resource).$0.000000142
Update Message ExecutionFor every update message executed$0.0000008378
Ten Update Instructions ExecutionFor every 10 instructions executed when executing update type messages$0.00000000000568
Xnet CallFor every inter-canister call performed (includes the cost for sending the request and receiving the response)$0.0000003692
Xnet Byte TransmissionFor every byte sent in an inter-canister call (for bytes sent in the request and response)$0.00000000142
Ingress Message ReceptionFor every ingress message received$0.000001704
Ingress Byte ReceptionFor every byte received in an ingress message$0.00000000284
GB Storage Per SecondFor storing a GB of data per second$0.00000018034

Assuming a 30 day month — 

GB Storage Per MonthFor storing a GB of data per month$0.467

PS:使用Bucket上传4GB文件的update花费只有大约0.0195美元。


A Student on the way to full stack of Web3.