Skip to content

Conversation

rynoV
Copy link
Contributor

@rynoV rynoV commented Jun 29, 2022

Addresses #8

  • Need to confirm about policyId and mintPolicy, unclear how these should be filled
    • policyId is supposed to have a MintingPolicyHash for the collection nft currency symbol, not sure how to get that since we only have the currency symbol
      • Nevermind, a currency symbol is a policy hash and serialization-lib can be used to convert the bytes to ScriptHash
    • mintPolicy is just an arbitrary version string, maybe it's okay to have it empty for now
  • Need to confirm which ownerPkh (and ownerPrice) go in the metadata: the value for the input token or the output token
    • Given that the minting transaction would need to include the output token's information, and the updated owner would be required for the output token to be used at all, the value for the output token seems like the correct choice
  • Need to use changes from Move Metadata code from CTL #7 and import metadata code from updated location
  • Use updated public api currencysymbol in metadata code (need to update CTL to a point which includes these changes)
    • I'm currently converting from Contract.Value.CurrencySymbol to Cardano.Types.Value.CurrencySymbol because of a discrepancy between the metadata and the NftCollection types, maybe the metadata code can be converted to use the Contract.Value.CurrencySymbol (since I believe that is the "public api" and best practice)
  • I'll probably also extract the metadata-adding to its own function
  • The build is currently broken because of a bug in the build system
  • Need to test once buy contract is fixed

@rynoV rynoV changed the title Initial work on adding purchase metadata Add purchase metadata Jun 29, 2022
@rynoV rynoV marked this pull request as draft June 29, 2022 23:13
rynoV added 2 commits June 30, 2022 14:22
The patch branch is based off the previous commit with
Plutonomicon/cardano-transaction-lib@f5785cd
applied

The use of `/\` in an instance declaration was causing an invalid string literal
in the output JS, something like "toMetadataArray/\"
@samuelWilliams99
Copy link
Contributor

First 2 points - yes
3rd point - Use the one that works for now, but ask in the #ctl channel about whether an issue should be created.

Base automatically changed from aleksandr/fd-to-nix-develop to neil/typescript-api July 1, 2022 10:17
@rynoV rynoV linked an issue Jul 4, 2022 that may be closed by this pull request
@rynoV rynoV mentioned this pull request Jul 20, 2022
@rynoV
Copy link
Contributor Author

rynoV commented Jul 22, 2022

#22 includes all the changes of this PR (this metadata was necessary for minting too)

@rynoV rynoV closed this Jul 22, 2022
@rynoV rynoV deleted the calum/purchase-metadata branch July 25, 2022 20:05
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

Successfully merging this pull request may close these issues.

Implement metadata for purchase transaction.

2 participants