eSealing and funds during development

Hi!
I am currently working with the eSealing example in your tutorials, and are now stuck with “two” issues.

First is that during development I would like to “redeploy” the contract, without having to change the name in lib.rs if possible?
So far I have to change the name or it will error, with already existing module. What is the correct way to redeploy the same with some updates?

In extension to this is it possible to use string variables in the receive statements?
So far I have tried this with no success:
static CONTRACT_NAME: &str = “eSealing”;

#[init(contract = CONTRACT_NAME, event = “Event”)]
But errors with “expected literal”
This would be ideal for when changing names for redeploys. (If I am going around this correctly)

Second issue is that with all my redeployments, I have spend all my CCD’s and do not have enough to deploy again. How do I get more?

Thanks in advance!
Toby

Hi.

If you change the contract and rebuild it then there should be no need to change the name to redeploy. If any code in the contract has changed then the module reference will be different since the module reference is just a SHA256 hash of the module.

Can you give an example of the changes you are making that lead to the error?

Regarding CCD, you can create additional accounts and request 2000CCD for each of those. That’s the only way at the moment.

Ahh okay then I see I just have an error in the file i guess :slight_smile: I thought I had made changes before building and redeploying.

And I will create an account and then get back to you again if I still face issues :slight_smile: Thanks!

1 Like