cadence icon indicating copy to clipboard operation
cadence copied to clipboard

Disallow import of structs with access(contract) initializers

Open bluesign opened this issue 4 months ago • 0 comments

Issue to be solved

I was checking DefiActions and stumble upon to

https://github.com/onflow/FlowActions/blob/5e217417f5898eca2fab8837e541b95816f80f2f/cadence/contracts/interfaces/DeFiActions.cdc#L125C3-L129C1

I think this is pretty ugly and we should not need tricks like this when coding with Cadence

Suggested Solution

I think disallowing import of structs with access(contract) initializers is the best way to solve.this.

PS: I am on some kind of sabbatical but happy to create a FLIP for it if necessary

bluesign avatar Oct 17 '25 13:10 bluesign