Skip to content

Support bigint #220

@SebastienGllmt

Description

@SebastienGllmt

The CDDL specification mentions bigint in the following section

      biguint = #6.2(bstr)
      bignint = #6.3(bstr)
      bigint = biguint / bignint
      integer = int / bigint
      unsigned = uint / biguint

However, historically we don't support any kind of bigint and instead just use big_int = _CDDL_CODEGEN_EXTERN_TYPE_

This isn't great because every Plutus datum needs bigint, so anybody that wants to use cddl-codegen to generate code for their dApp (ex: projected NFT dApp) needs to tackle this

In my opinion, we have two options:

  1. Mention somewhere in the docs that if you need bigint and is for Cardano to just import relevant CML crate and use BigInt from it
  2. Add bigint as part of the static types shipped in cddl-codegen. This means code duplication if you're using multiple cddl-codegen generated libraries, but this is the same as having duplicate definitions of DeserializeError which we already do

Metadata

Metadata

Assignees

No one assigned

    Labels

    CDDL featureFeature that is required for proper parsing of CDDL files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions