Skip to content

cshell tx invoke fails with invalid param type after updating with tx3up #50

@LorenzoRD2003

Description

@LorenzoRD2003

After updating with tx3up, I have an issue for what looks like a trix/cshell compatibility bug under:

  • tx3c 0.21.0
  • trix 0.25.1
  • cshell 0.14.0

I reduced it to a tiny repro with two minimal Tx3 transactions, both failing with:

invalid param type

My main.tx3 file is:

party User;

tx publish_ref_script_repro(
  source_utxo: UtxoRef,
  reference_script_lovelace: Int,
) {
  input source {
    ref: source_utxo,
  }

  cardano::publish {
    to: User,
    amount: Ada(reference_script_lovelace),
    version: 3,
    script: 0x5101010023259800a518a4d136564004ae69,
  }

  output {
    to: User,
    amount: source - Ada(reference_script_lovelace) - fees,
  }
}

tx plain_transfer_repro(
  source_utxo: UtxoRef,
  output_lovelace: Int,
) {
  input source {
    ref: source_utxo,
  }

  output {
    to: User,
    amount: Ada(output_lovelace),
  }

  output {
    to: User,
    amount: source - Ada(output_lovelace) - fees,
  }
}

Repro steps:

trix build -v

cshell tx invoke \
  --tii-file .tx3/tii/eryxcoop/cshell-invalid-param-type-repro/1.0.0/main.tii \
  --store-path /path/to/cshell.toml \
  --provider trix-local \
  --signers bob \
  --unsafe \
  --tx-template publish_ref_script_repro \
  --args-file args.json \
  --skip-submit \
  -o json

The same happens with:

cshell tx invoke \
  --tii-file .tx3/tii/eryxcoop/cshell-invalid-param-type-repro/1.0.0/main.tii \
  --store-path /path/to/cshell.toml \
  --provider trix-local \
  --signers bob \
  --unsafe \
  --tx-template plain_transfer_repro \
  --args-file args_plain_transfer.json \
  --skip-submit \
  -o json

I am opening this first in txpipe/cshell because the failing command is cshell tx invoke, although the trigger seems to be the TII generated by current trix build.

My current suspicion is that this is a compatibility issue between:

  • trix 0.25.1
  • cshell 0.14.0

specifically around the namespaced TII generated by trix build.

I am also open to fix the issue and do a PR if you need it, because this is currently blocking my development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions