flow-playground icon indicating copy to clipboard operation
flow-playground copied to clipboard

Deploying contract with init storage does not show storage container

Open timongll opened this issue 4 years ago • 2 comments

When deploying a contract with a storage initialized, storage container does not show. Screen Shot 2021-07-16 at 6 53 03 PM

To Reproduce https://play.onflow.org/3a0ea2eb-f827-440e-a03f-13bb411e1518?type=account&id=ff3530f4-306d-4c0b-9c28-fe3e00691e71

Deploy 0x01 then 0x02, Flow Vault does not show on 0x02.

Execute transaction "Initialize Flow vaults" with 0x01, 0x02, 0x03, 0x04, 0x05 as params. 0x01, 0x03, 0x04, 0x05 show storage, 0x02 does not.

timongll avatar Jul 17 '21 08:07 timongll

@10thfloor, This one is tricky, I checked very little but I think, as the contract is not active in the transaction it is deployed this is causing new types to not resolve on delta changes.

Here is a quick and ugly fix: (for flow-playground-api) https://gist.github.com/bluesign/c5ef992fc4da27bc1d6aab7767239229#file-resourcefix-diff

This is just executing a single import transaction after the contract deploys and then resolving deltas.

bluesign avatar Jul 17 '21 09:07 bluesign

I'll just add that this bug impacts the "Hello World" cadence tutorial. In the "Creating a Resource" section it says we should be able to see a resource after deploy, but it does not show in the UI as described above.

ic3guy avatar Sep 29 '21 05:09 ic3guy