Comments (10)
@Riley-Kilgore should be fixed now with 0.1.9
. Lemme know if everything works for you.
from lucid.
Highly appreciate your time and it seems that this issue is now resolved.
You are the real MVP @alessandrokonrad
from lucid.
@zachyking I forgot one little detail after getting the ex units back. I hope 0.2.0
resolves the issue.
from lucid.
@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 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.
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.
from lucid.
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.
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.
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.
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)
- How to build transaction whose input is from zero address and output is also zero address? HOT 2
- Potential External Memory Leak - External Resources not being collected. HOT 2
- Unclear mapping of data structures between lucid and aiken HOT 1
- Add Docs for Vite/SvelteKit HOT 1
- Nami requests signature fee instead of requesting payment?
- Nami requests signature fee instead of requesting payment? HOT 1
- next 13 and lucid HOT 2
- No "exports" main defined in package.json HOT 2
- Fee Estimation issue when building contract remdemption TX on the backend. HOT 1
- `'amounts-as-strings': 'true'` for Maestro provider endpoints
- "Max collateral inputs reached" HOT 2
- Merging change utxos in minting transaction HOT 1
- No "exports" main defined while using lucid-cardano with typescript.
- vite node vue3 http://127.0.0.1:4001/node_modules/.vite/deps/cardano_multiplatform_lib_bg.wasm 404 (Not Found)
- Unlock transaction: Uncaught (in promise) Redeemer (Spend, 0): Failed to deserialise PlutusData using UnConstrData: HOT 7
- Nextjs 14 and context
- How to use blueprint.ts?
- Could not serialize the data: TypeError: Cannot read properties of undefined (reading 'plutuslist_new') HOT 1
- Can't read transactionbuilderconfigbuilder_new in React Vite app HOT 4
- Transaction submit error caused by filled datum and datumHash field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucid.