Hello, I’m pretty new to FuelVM and Sway and I was going through the docs and the “Getting Started” flow yesterday deploying to
There’s a couple of things I don’t fully understand and would appreciate any help you can give me clearing them up:
Counter contract I deployed had the same exact Contract Id that was present in the “Getting Started” page. I’m not sure if I’m correctly understanding the Contract ID computing formula but it seems that given the same exact contract bytecode, without the addition of salt to the
sha256, the Contract ID will always be the same. Is this correct?
If that is the case then how are multiple deploys of the same bytecode (without salt) are handled?
I deployed the same contract twice and after the second deployment it seemed like the storage of the previous deployment was reset.
You can find the transactions in question https://fuellabs.github.io/block-explorer-v2/address/fuel1zg72j04gfc03mvxawg0egf3v0lnu3gg3y0qw8993z0wluf5xttsq87jxeq
The zeroth output for both of them are the same Contract ID.
I’m sorry if this is a dumb question but I don’t really understand what’s happening here.