Giter Club home page Giter Club logo

Comments (10)

alessandrokonrad avatar alessandrokonrad commented on June 3, 2024 4

@Riley-Kilgore should be fixed now with 0.1.9. Lemme know if everything works for you.

from lucid.

Riley-Kilgore avatar Riley-Kilgore commented on June 3, 2024 4

Highly appreciate your time and it seems that this issue is now resolved.

You are the real MVP @alessandrokonrad

from lucid.

alessandrokonrad avatar alessandrokonrad commented on June 3, 2024 3

@zachyking I forgot one little detail after getting the ex units back. I hope 0.2.0 resolves the issue.

from lucid.

zachyking avatar zachyking commented on June 3, 2024 1

@alessandrokonrad Withdraw 1 utxo and pay back to validator works. Withdrawing two utxos and paying back also works. Withdrawing 3 or more utxos and paying back results in the same error as before.

from lucid.

zachyking avatar zachyking commented on June 3, 2024 1

@zachyking I forgot one little detail after getting the ex units back. I hope 0.2.0 resolves the issue.

Yes, confirmed: https://testnet.cardanoscan.io/transaction/e521ca28544a53bbb45c923db10ee91940144961a735d825394f2e2c240a24c1
Amazing, thank you!!

from lucid.

Riley-Kilgore avatar Riley-Kilgore commented on June 3, 2024

The same issue seems to occur when trying to spend multiple UTxOs from the same validator.

Based on the statement made in the stack exchange link below, it would appear that this is due to the cost model used.

The PPViewHashesDontMatch error from Edit #2 is caused by protocol parameters file not having cost models field populated - this is a problem with blockfrost-cardano-cli not having access to cost models via Api resulting in script transactions failing. –
sorki
Feb 2 at 13:10

I am not all that familiar with the cost model, I tried to use the values provided in my parameters file from the cli, (as they were different than the values present in Lucid), but this did not yield any positive results.

https://cardano.stackexchange.com/questions/6934/ppviewhashesdontmatch-and-unspendableutxonodatumhash-error-on-redeeming-funds-fr

from lucid.

alessandrokonrad avatar alessandrokonrad commented on June 3, 2024

3: Spend from the validator, but send 2 ADA back to the contract.

`const utxo = (await Lucid.utxosAt(exampleAddress))[0];

let tx: TxComplete tx = await Tx.new() .payToContract(exampleAddress, ANY_DATUM(), { lovelace: BigInt(2000000) }) // This breaks. .collectFrom([utxo], ANY_REDEEMER()) .attachSpendingValidator(exampleScript) .complete();

Likely because ANY_DATUM is applied twice to the witness set. Once from the utxo you redeem from and once for the new output you create. I have to create a hashmap for datums and check if they were already added

from lucid.

alessandrokonrad avatar alessandrokonrad commented on June 3, 2024

Ah no I'm doing that already. However I realize a strange behaviour applying multiple datums, when they are the same or a specific numbers. I'm looking into it. It's somewhere in the serialization-lib.

from lucid.

alessandrokonrad avatar alessandrokonrad commented on June 3, 2024

The costmodel must be correct already, because I'm able to spend from a script utxo. I feel like something is messed up with datums and redeemers rather.

from lucid.

jonathanfishbein1 avatar jonathanfishbein1 commented on June 3, 2024

I seem to be experiencing this issue with the following code

const transaction = await lucid .newTx() .payToContract(scriptAddress , Lucid.Data.empty() , { lovelace: BigInt(Number(3000000)), 'fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50434c415353494342414259424c55453031': BigInt(Number(4)) }) .collectFrom([utxo], serializedRedeemer) .attachSpendingValidator(radSaleScript) .addSigner(await lucid.wallet.address()) .payToAddress('addr_test1vrh0kkuahtz28qpfdhsx2hm2eekf06des8h03xnm757u65sd6egwy' , { lovelace: lovelaceAmount }) .payToAddress(await lucid.wallet.address(), { lovelace: minLovelaceAmount , 'fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50434c415353494342414259424c55453031': BigInt(Number(1)) }) .complete()

I'm using lucid-cardano version 0.3.5. I first experienced this using the cli as a start endpoint and lucid as a buy endpoint. I created a lucid start endpoint to rule out a protocol parameters mismatch but still encountered the error

from lucid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.