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

Global.deserialize method #768

Open
SethDusek opened this issue Sep 17, 2024 · 0 comments
Open

Global.deserialize method #768

SethDusek opened this issue Sep 17, 2024 · 0 comments
Labels
6.0 Functionality needed for Ergo v6.0 (interpreter v3)

Comments

@SethDusek
Copy link
Collaborator

SethDusek commented Sep 17, 2024

Add a versioned method to interpreter to deserialize typed object from raw bytes. Examples:

{
    val ba = fromBase16("028a5b7f7f7f7f7f7f6c");
    val b = Global.deserialize[BigInt](ba)
    b == byteArrayToBigInt(ba)
}
{
    val ba = getVar[Coll[Byte]](21).get
    val prop = Global.deserialize[SigmaProp](ba)
    prop
}

Reference PR: ergoplatform/sigmastate-interpreter#979

@SethDusek SethDusek added the 6.0 Functionality needed for Ergo v6.0 (interpreter v3) label Sep 17, 2024
@SethDusek SethDusek changed the title Add Global.deserialize method Global.deserialize method Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0 Functionality needed for Ergo v6.0 (interpreter v3)
Projects
None yet
Development

No branches or pull requests

1 participant