onflow / flowkit

Apache License 2.0
6 stars 10 forks source link

Contract deployment args fix #42

Closed jribbink closed 3 months ago

jribbink commented 3 months ago

solves https://github.com/onflow/flow-cli/issues/1352 & https://github.com/onflow/flow-cli/issues/1427

Mostly a backport of the changes made in https://github.com/onflow/flowkit/compare/dc655f4...a1765cd on the stable-cadence branch.

Forced changes that were necessary to update to latest Cadence version unintentionally fixed this issue

That being said, it uses the Prepare function instead of marshalling and unmarshalling as a hack to convert structs to map[string]any which is a better/simpler way to fix this. Because the JSON values from Cadence are structs, we cannot conform to map[string]any, so I relaxed the deployment arg type to any