-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with moving a utxo locked in always_succeeds contract #678
Comments
Hey @devMoney71 ! You need to provide collateral inputs to not get the error "Plutus inputs are present, but no collateral inputs are added". Also |
Thank you for your reply.
But I am still getting errors.
|
According to errors you don't have a redeemer in your witnesses set, do not modify witnesses set after you built a tx except vkey and bootstrap witnesses |
Hey @devMoney71 ! Did it helped ? |
Sorry for the late reply. I have an another error.
Can you provide a link for a sample code? |
@devMoney71 you need to update the tool which you use to to submit a tx |
I am a beginner who just started developing with Cardano.
I am writing a javascript code to move a utxo locked in the trivial.always_succeeds contract (preprod: addr_test1wquu2gxsvfa2lfeg7ljd6yq59dmuy4up8sm02l3vhz8h9fg4q3ckq), using a reference UTXO.
I managed to sent a utxo with datum "TEST" to the contract, but failed to withdraw it to my address.
Here is a part of my code.
Create a TransactionBuilder and a TxInputsBuilder:
Create a TransactionInput for a transaction, and also a reference TransactionInput :
And build the input of transction:
Here
plutusWitness
is defined as follows:In fact, I am not sure those variables are set correctly. The hash of the script is "39c520d0627aafa728f7e4dd10142b77c257813c36f57e2cb88f72a5", I found this hash at "https://preprod.cardanoscan.io/transaction/be8217d6682be1d1888ca112896345612f0d6dec4552970188a9d1cbcf47e17b?tab=utxo".
And then, I add collateral utxo.
After that, I use calc_script_data_hash:
Then, add change:
txBuilder.add_change_if_needed(CardanoWasm.Address.from_bech32(to));
And then, build tx:
let tx = txBuilder.build_tx();
And sign with
payment_key
(this is for collateral) and submit transaction using blockfrost api:But got the following error.
I would appreciate any help you can provide on this issue. Thank you.
The text was updated successfully, but these errors were encountered: