spacebudz / lucid

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.
https://lucid.spacebudz.io
MIT License
339 stars 139 forks source link

Collateral error #185

Closed jonathanfishbein1 closed 1 year ago

jonathanfishbein1 commented 1 year ago
        "info": "submit tx failed: Error: 400:\n0:[{\"badTranslation\":\"Unknown transaction input (missing from UTxO set): dc46bf1a3825c4be39264bbc627e54a5a5f377b83a4642aefb3dd3b2b74cfe6c#3\"}]\n1: {\"consumed\":{\"coins\":2000000,\"assets\":{\"6787a47e9f73efe4002d763337140da27afa8eb9a39413d2c39d4286.524144546f6b656e73\":189610}},\"produced\":{\"coins\":34509876,\"assets\":{\"6787a47e9f73efe4002d763337140da27afa8eb9a39413d2c39d4286.524144546f6b656e73\":189610}}}\n2: [{\"txId\":\"dc46bf1a3825c4be39264bbc627e54a5a5f377b83a4642aefb3dd3b2b74cfe6c\",\"index\":3}]\n3: {\"missingCollateralInputs\":null}\n4: {\"computedFromDelta\":-31262530,\"declaredInField\":1247346}\n5: {\"requiredCollateral\":1247346,\"actualCollateral\":-31262530}\n"

I'm waiting for a previous tx to complete using awaitTx

jonathanfishbein1 commented 1 year ago

Checking that the tx is in the wallet after awaitTx alleviates this issue