nervosnetwork / capsule

Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
MIT License
61 stars 34 forks source link

Prevent deployment transactions which destroy type_id #13

Open jjyr opened 4 years ago

jjyr commented 4 years ago

We need to check the deployment transactions before sent them; make sure there no type_id be destroyed. If a user intended to destroy type_id of a cell, the user must explicitly pass the type_id in the command line.

TheWaWaR commented 3 years ago

It seems there is no possible destroy a type_id cell? https://github.com/nervosnetwork/capsule/blob/cdad051f705bc77c88cb849091920a87458d8a4f/src/deployment/deployment_process.rs#L212-L218

jjyr commented 3 years ago

Because once we lost the type ID, we have no way to resume it, this issue just suggests to add another mechainism to protect this.