HarmonicLabs / plu-ts-docs

0 stars 7 forks source link

Update "Vesting" example project on documentation #11

Open amnambiar opened 1 month ago

amnambiar commented 1 month ago

Worked on updating the vesting-pluts example, to use Blockfrost API; still using cardano-cli for generating wallets and signing the transaction. See changes here.

Used plu-ts@0.7, blockfrost-pluts@0.1.12, cardanocli-pluts@0.1.4-dev1 in the example.

Now encountered error within plu-ts that @michele-nuzzi needs to work on.

$ npm run vesting:claim

> vesting-pluts@0.0.1 vesting:claim
> npm run build:light && node dist/app/claimVesting.js

> vesting-pluts@0.0.1 build:light
> tsc -p ./tsconfig.json && tsc-alias -p ./tsconfig.json

/home/anusree/Projects/IO/vesting-pluts/node_modules/@harmoniclabs/plu-ts-offchain/dist/TxBuilder/TxBuilder.js:840
            throw new Error("script consumed with ".concat((0, cardano_ledger_ts_1.txRedeemerTagToString)(rdmr.tag), " redemer ") +
                  ^

Error: script consumed with Spend redemer and index '0'

called with data arguments:
datum: d8799f581c755066d1803c4c01653e91a571710cec49d8f1d223c0bc09e9dbab7d1b0000018fe949b91eff
redeemer: 00
script context: d8799fd8799f9fd8799fd8799fd8799f582074dabed42f9a7687c66fe92934ab349f5387caccdfae7106a047e708d537e295ff00ffd8799fd8799fd87a9f581c9d49a082b34a8fe4b60f4c48735b80d92c0449f3698f1b4e92cf44ffffd87a80ffbf40bf401a00989680ffffd87b9fd8799f581c755066d1803c4c01653e91a571710cec49d8f1d223c0bc09e9dbab7d1b0000018fe949b91effffd87a80ffffd8799fd8799fd8799f5820d371f6a7652a557fc672948218c02371570edae7d2161911c34bb8d8b3802f6aff00ffd8799fd8799fd8799f581c755066d1803c4c01653e91a571710cec49d8f1d223c0bc09e9dbab7dffd87a80ffbf40bf401b00000002540be400ffffd87980d87a80ffffff809fd8799fd8799fd8799f581c755066d1803c4c01653e91a571710cec49d8f1d223c0bc09e9dbab7dffd87a80ffbf40bf401b0000000254a18813ffffd87980d87a80ffffbf40bf401a0002f26dffffbf40bf4000ffff80a0d8799fd8799fd87a9f1b0000018f878718e8ffd87980ffd8799fd87b80d87980ffff9f581c755066d1803c4c01653e91a571710cec49d8f1d223c0bc09e9dbab7dffbfd87a9fd8799fd8799f582074dabed42f9a7687c66fe92934ab349f5387caccdfae7106a047e708d537e295ff00ffff00ffa05820711cbe769fdb2e8e24e00dbe0e790d8db5f533c3cdac6d12a85f390c8f79df5affd87a9fd8799fd8799f582074dabed42f9a7687c66fe92934ab349f5387caccdfae7106a047e708d537e295ff00ffffff

failed with 
error message: undefined
additional infos: undefined
script execution logs: [deadline not reached or not specified]

    at onEvaluationResult (/home/anusree/Projects/IO/vesting-pluts/node_modules/@harmoniclabs/plu-ts-offchain/dist/TxBuilder/TxBuilder.js:840:19)
    at _loop_2 (/home/anusree/Projects/IO/vesting-pluts/node_modules/@harmoniclabs/plu-ts-offchain/dist/TxBuilder/TxBuilder.js:317:38)
    at _loop_1 (/home/anusree/Projects/IO/vesting-pluts/node_modules/@harmoniclabs/plu-ts-offchain/dist/TxBuilder/TxBuilder.js:333:17)
    at TxBuilder.buildSync (/home/anusree/Projects/IO/vesting-pluts/node_modules/@harmoniclabs/plu-ts-offchain/dist/TxBuilder/TxBuilder.js:362:27)
    at file:///home/anusree/Projects/IO/vesting-pluts/dist/app/claimVesting.js:30:34
    at Generator.next (<anonymous>)
    at fulfilled (file:///home/anusree/Projects/IO/vesting-pluts/dist/app/claimVesting.js:4:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v21.7.2

Moving this task to Blocked (back to Todo on project board) for now, until this can be taken up.

amnambiar commented 2 days ago

@michele-nuzzi ,

Here's the PR for vesting-pluts example - https://github.com/HarmonicLabs/vesting-pluts/pull/2

Here's the PR for the updated documentation for the example - https://github.com/HarmonicLabs/plu-ts-docs/pull/18

Cc: @EehMauro