bloxbean / aiken-java-binding

A Java binding for Aiken
MIT License
5 stars 1 forks source link

Support for contract call with reference inputs #1

Closed satran004 closed 1 year ago

satran004 commented 1 year ago

In v0.0.2, if transaction has reference inputs, script evaluation fails with following error.

RedeemerError { tag: "Spend", index: 0, err: ResolvedInputNotFound }

Workaround : During the transaction cost evaluation, remove the reference inputs from the transaction and add the plutus script to the witness set. After calculating the script cost, you can add back the reference input again.

matiwinnetou commented 1 year ago

Isn't already done in CCL 0.5-alpha?

satran004 commented 1 year ago

Yes, it is included in 0.5.0-alpha.2. However, due to the package renaming in Cardano Client Lib, it is required to update the Aiken Java Binding accordingly

satran004 commented 1 year ago

v0.0.7 supports this. Example: https://github.com/bloxbean/aiken-java-binding/blob/main/src/integrationTest/java/com/bloxbean/cardano/aiken/tx/evaluator/GuessSumContractIntegrationTest.java