Commit Graph

25 Commits

Author SHA1 Message Date
KtorZ b5047d623a
Update to pallas=0.31.0 2024-11-19 14:53:36 +01:00
KtorZ 93d0191489
Fix latest clippy warnings. 2024-10-25 11:27:28 +02:00
KtorZ 8a3bbfc89a
Simplify optional datum extraction by removing duplication 2024-09-12 17:19:17 +02:00
solidsnakedev defce9be4e fix: Plutus V3 NoDatum - Error: missing required inline datum or datum hash in script input 2024-09-11 15:25:20 -06:00
KtorZ f879f6d183
Fix script context translations for withdrawals and validity intervals. 2024-08-13 23:43:47 +02:00
KtorZ 7501538053
Add script context translations for voting purpose. 2024-08-13 16:24:01 +02:00
KtorZ bfc93bf076
Add script context translation for new Conway certificates 2024-08-13 10:56:29 +02:00
KtorZ f244b9c496
Add support for protocol parameters (except cost models)
We can now simulate transactions with protocol parameters voting
  procedures. Cost models remain to be done, though.
2024-08-13 10:56:29 +02:00
KtorZ cfca0da4e9
Add (partial) support for simulating contract with proposal procedures
This covers every proposal procedures but protocol parameters, this
  one is yet to be done. It spans over 30+ fields, and felt like it is a
  big enough piece to tackle it on its own.
2024-08-13 10:56:29 +02:00
KtorZ 6b6bace8a5
test 'mint' purpose and script context creation.
Alongside a bunch of other stuff from the coverage list. In
  particular, the mint transaction contains:

  - reference inputs
  - multiple outputs, with assets, and type-0, type-1 and type-6
    addresses.
  - an output with a datum hash
  - an output with an inline script
  - carries an extra datum witness, preimage of the embedded hash
  - mint, with 2 policies purposely ordered wrongly, with 1 and 2
    assets purposely ordered wrong. One of the mint is actually a
    burn (i.e. negative quantity)
2024-08-13 10:56:29 +02:00
KtorZ 821f7bd8c7
Fix ToPlutusData serializer for V3
This is intense, as we still want to preserve the serializer for V1 &
  V2, and I've tried as much as possible to avoid polluting the
  application layer with many enum types such as:

  ```
  pub enum TxOut {
    V1(TransactionOutput),
    V2(TransactionOutput),
    V3(TransactionOutput),
  }
  ```

  Those types make working with the script context cumbersome, and are
  only truly required to provide different serialisation strategies. So
  instead, we keep one top-level `TxInfo V1/V2/V3` type, and we ensure
  to pass serialization strategies as type wrappers.

  This way, the strategy propagates through the structure up until it's
  eliminated when it reaches the relevant types.

  All-in-all, this strikes a correct balance between maintainability and
  repetition; and it makes it possible to define _different but mostly
  identical_ encoders for the various versions.

  With it, I've been able to successfully encode a V3 script context and
  match it against one produced using the Haskell libraries. More to
  come.
2024-08-13 10:55:23 +02:00
KtorZ fdf7a81288
implement a strict subset of PlutusV3 transaction info
More specifically, that is simply mimicking the script context from
  v2, minus the new governance features.
2024-08-13 10:55:23 +02:00
KtorZ 445ffc483d
Further remove todos for v3, and reduce duplication in transaction evaluation 2024-08-13 10:55:22 +02:00
KtorZ ff4a480242
Upgrade pallas to v0.0.29, and start support for simulating transactions carrying Plutus v3 scripts. 2024-08-13 10:55:22 +02:00
hade ad3c9f24b7
chore: minimal pallas dependencies 2024-05-30 15:09:05 +07:00
rvcas 589bb9a4b3
chore: change how we depend on pallas 2024-01-24 21:26:48 -05:00
rvcas 8f765bfd52
fix: some breaking changes from pallas v0.18 2023-03-06 13:17:14 -05:00
alessandrokonrad 3aba9baba5 Fixed reward account creation in ScriptContext 2023-01-05 10:31:32 -05:00
alessandrokonrad a14dae5863 changed slot_length to u32 2022-10-17 08:35:45 -04:00
rvcas 08596588a7
feat: output total budget spent from cli 2022-09-24 20:23:51 -04:00
rvcas 8620332b75
feat: move input from json to helper method 2022-09-24 19:40:07 -04:00
alessandrokonrad 35d09c642b fixed time conversion 2022-09-24 23:59:58 +02:00
Kasey White ca2d8f0a1f ada policy is now empty and mintValue includes 0 ada 2022-09-24 15:47:51 -04:00
Kasey White 3bb5826b91 change how mint gets converted to plutus data 2022-09-23 18:34:24 -04:00
rvcas 9e280f9cb5
feat: rename transaction eval and add error enum 2022-09-18 15:35:10 -04:00