Plutonomicon / cardano-transaction-lib

A Purescript library for building smart contract transactions on Cardano
https://plutonomicon.github.io/cardano-transaction-lib/
MIT License
92 stars 50 forks source link

Replace Data.BigInt with JS.BigInt #1551

Closed kozross closed 10 months ago

kozross commented 11 months ago

Closes #1472. Due to us needing Aeson instances, I had to create a newtype wrapper: I've tried to keep its API as similar to the Data.BigInt one as possible, so that switching is painless.

For some reason, I get CI failures due to Nix not installing the necessary library: locally I have no problems.

Pre-review checklist

klntsky commented 11 months ago

For some reason, I get CI failures due to Nix not installing the necessary library: locally I have no problems.

You probably forgot to run spago2nix, read doc/development.md

bladyjoker commented 10 months ago

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

bladyjoker commented 10 months ago

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

  ✗ AdditionalUtxos example:
  Error: Couldn't get tx output for (TransactionInput { index: 1u, transactionId: (TransactionHash (hexToByteArrayUnsafe "a95adbfc463c87aca6eeab66174bf803752d0b861643dcd26e2bbd6c451f43ac")) })
    at Module.error (file:///build/output/Effect.Exception/foreign.js:6:10)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:79:7)
    at go (file:///build/output/Data.Traversable/foreign.js:36:42)
    at file:///build/output/Data.Traversable/foreign.js:46:20
    at <anonymous> (/build/.spago/foldable-traversable/v6.0.0/src/Data/Traversable.purs:207:20)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:118:59)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:78:44)
bladyjoker commented 10 months ago

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

  ✗ AdditionalUtxos example:
  Error: Couldn't get tx output for (TransactionInput { index: 1u, transactionId: (TransactionHash (hexToByteArrayUnsafe "a95adbfc463c87aca6eeab66174bf803752d0b861643dcd26e2bbd6c451f43ac")) })
    at Module.error (file:///build/output/Effect.Exception/foreign.js:6:10)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:79:7)
    at go (file:///build/output/Data.Traversable/foreign.js:36:42)
    at file:///build/output/Data.Traversable/foreign.js:46:20
    at <anonymous> (/build/.spago/foldable-traversable/v6.0.0/src/Data/Traversable.purs:207:20)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:118:59)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:78:44)

Dammit this passes locally! Oh God of Reproducibility, where is you universal determinism now? Why does Plutip have free will while the rest of us are wallowing in our destinies?

bladyjoker commented 10 months ago

Woohoo! @klntsky this is green!