Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around MintAssets / MintsAssets difference in the codegen #11

Open
klntsky opened this issue Aug 30, 2024 · 1 comment
Open

Work around MintAssets / MintsAssets difference in the codegen #11

klntsky opened this issue Aug 30, 2024 · 1 comment

Comments

@klntsky
Copy link
Member

klntsky commented Aug 30, 2024

The methods for Mint are:

  insert(key: ScriptHash, value: MintAssets): MintAssets | void;
  get(key: ScriptHash): MintsAssets | void;

MintAssets value is being inserted, but get returns MintsAssets. This breaks our codegen assumption for map-like types, that thinks that the exact same type that was put in can be extracted.

We work around this downstream in a very hacky way: https://github.com/mlabs-haskell/purescript-cardano-types/blob/8f9e5d0e0a465990024fac7c8e8db36fcd56ab8c/src/Cardano/Types/Mint.purs#L176

@klntsky
Copy link
Member Author

klntsky commented Aug 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant