Skip to content

Error in spending utxos with reference script #461

@larestrepo

Description

@larestrepo

Describe the bug
Spending utxos with reference script fails with following error after trying to submit the transaction:

Failed to submit transaction. Error code: 400. Error message: {"contents":{"contents":{"contents":{"era":"ShelleyBasedEraConway","error":["ConwayUtxowFailure (UtxoFailure (FeeTooSmallUTxO (Mismatch {mismatchSupplied = Coin 175181, mismatchExpected = Coin 1432410})))"],"kind":"ShelleyTxValidationError"},"tag":"TxValidationErrorInCardanoMode"},"tag":"TxCmdTxSubmitValidationError"},"tag":"TxSubmitFail"}

To Reproduce
Spend a utxo containing a reference script such as:

{
    'input': {
      'index': 0,
      'transaction_id': TransactionId(hex='7b2e253ec4c788....'),
    },
    'output': {
      'address': addr_...,
      'amount': {'coin': 51401060, 'multi_asset': {}},
      'datum': None,
      'datum_hash': None,
      'post_alonzo': False,
      'script': b'Y-\xc1\x01\x00\x003#########################################################################################""#####################################################################################################################7J\x90\x00\x1b\xb1I\x8c\x8c\x8c\x8c\x8c\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcd@\x14\x02\x00T\x02\x80$\x03@0\x04\x81X\x06\x00<\x03\x80\x18\x02\xc0\x1c\x06\x84\x01\x04\x00\xc4\x00\x84\x00A\xdc\x1d\xc1\xdc\x1d\xc4\x88\x88\x88\x88\x88\x88\x88\x88\x88\x8c\x8c\x8c\x8c\x8c\x94\xcc\xd5\xcd\x19\x18q\x00\x88\x00\x99\x18Y\x00\x88\x00\xa8\x03\x89\x91\x91\x91\x91\x91\x91\x91\x92\x99\x9a\xb9\xa3#\x0e\xa0\x11\x00...

Expected behavior
Transaction is submit without errors.

Environment and software version (please complete the following information):

  • PyCardano V 0.15.0

Additional context
I managed to submit the transaction by artificially adding some additional lovelace amount to the fee_buffer field...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions