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

Get eval tests working for Raw validator #80

Open
MitchTurner opened this issue Dec 30, 2022 · 1 comment
Open

Get eval tests working for Raw validator #80

MitchTurner opened this issue Dec 30, 2022 · 1 comment
Labels
3 3 point story good first issue Good for newcomers

Comments

@MitchTurner
Copy link
Collaborator

They are broken right now because the Plutus scripts follow different patterns than Aiken, and I've been prioritizing Aiken. The best solution would be to rewrite the scripts in Aiken, but we can also do custom Constrs around some of the data types to make them work

@MitchTurner MitchTurner added good first issue Good for newcomers 3 3 point story labels Dec 30, 2022
@MitchTurner
Copy link
Collaborator Author

This is what it used to be, and when we removed the constr, it broke some of the tests.

impl From<i64> for PlutusData {
    fn from(num: i64) -> Self {
        let neg = num.is_negative();
        let val = num.unsigned_abs();
        let inner_data = PlutusData::BigInt(BigInt::Int { neg, val });
        let constr = Constr {
            tag: 121,
            any_constructor: None,
            fields: vec![inner_data],
        };
        PlutusData::Constr(constr)
        inner_data
    }
}

I didn't fix it because we do have tests that work with the new behavior, just in the sample-dapps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 3 point story good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

1 participant