input-output-hk / marlowe-cardano

Marlowe smart contract language Cardano implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

marlowe-cli util faucet throws TxBodyOutputNegative

kugiyasan opened this issue · comments

Summary

I cannot use marlowe-cli util faucet on the testnet. I tried the simplest command, yet I get an error back.

Steps to reproduce

  1. Get a local instance of cardano-node running and set the CARDANO_NODE_SOCKET_PATH environment variable correctly.
  2. Execute the following command:
marlowe-cli util faucet --testnet-magic 1097911063 \
                        --socket-path "$CARDANO_NODE_SOCKET_PATH" \
                        --out-file faucet.marlowe \
                        --submit 600 \
                        --lovelace 50000000 \
                        addr_test1vp985fydptl4thxrupuz5wd9y7ykscjq9xrwylqmsgg22rqy3nlk8

Expected behavior

I'm expecting to not get any errors and have 50 ADA in my wallet.

System info

  • Output of uname -srm:
    Linux 5.10.109-1-MANJARO x86_64
  • Output of marlowe-cli --version:
    marlowe-cli 0.0.4.0 @ 548a074
  • Output of cardano-cli --version:
    cardano-cli 1.34.1 - linux-x86_64 - ghc-8.10
    git rev a357c17554181f98003b9d5dc0b561ff8f0d1bf6
  • Output of cardano-node --version:
    cardano-node 1.34.1 - linux-x86_64 - ghc-8.10
    git rev a357c17554181f98003b9d5dc0b561ff8f0d1bf6

Screenshots and attachments

Error message:

TxBodyError (TxBodyOutputNegative (-37840380) (TxOutInAnyEra AlonzoEra (TxOut (AddressInEra (ShelleyAddressInEra ShelleyBasedEraAlonzo) (ShelleyAddress Testnet (ScriptHashObj (ScriptHash "d441227553a0f1a965fee7d60a0f724b368dd1bddbc208730fccebcf")) StakeRefNull)) (TxOutValue MultiAssetInAlonzoEra (valueFromList [(AdaAssetId,-37840380),(AssetId "1ca1fc0c880d25850cb00303788dfb51bdf2f902f6dce47d1ad09d5b" "D",7035721248),(AssetId "931e73ba70e7394dad92312c888e937517f5a70caaa13a02da1422e7" "DIVIDE GOLDEN FOOT NFT #3207",1),(AssetId "b8e24f544db5d6eac591193df96f924e59e834b88a3ad82a18cde0c8" "B",47075426342),(AssetId "c868cdb63090661d815bac251aad5fcffaef94cf099e6cd81df33490" "GOLD",96158900775),(AssetId "e524317916889efe52f212e386d689df25086fb6ec0642310a755f55" "DH NFT #3207",1),(AssetId "f76a081edd1195620a3b54af50bb3d6e81ad43859cd1dc31e1d4e713" "DIVIDE Golden Foot NFT #3207",1)])) TxOutDatumNone)))

Additional context

I tried to run the command natively and with nix-shell, same result

The error message mentionned something about "Golden Foot NFT", and I was able to find this on cardanoscan.io

The cardano-node instance is running fine, since I can query it with cardano-cli query tip --testnet-magic 1097911063 and get the expected output.

Thank you for your bug report. Actually, the faucet for marlowe-cli util faucet is only funded on the private Marlowe testnets, not on the public testnet (magic 1097911063). If you need test ADA on the public testnet, you can use https://testnets.cardano.org/en/testnets/cardano/tools/faucet/ to receive those funds. If you are in the Marlowe Pioneers Program, you will receive instructions on using Marlowe's private test network.

The error you received is what would be expected from a faucet that does not have pure ADA UTxOs at its address. In fact, it looks like the faucet on the public testnet contains few UTxOs with tokens like "Golden Foot NFT".

Fixed in 57f5845. The help now reads . . .

$ marlowe-cli util faucet --help
Usage: marlowe-cli util faucet --testnet-magic INTEGER --socket-path SOCKET_FILE
                               [--lovelace LOVELACE] --out-file FILE 
                               [--submit SECONDS] ADDRESS

  Fund an address from a faucet. Note that the faucet is only funded on the
  private developer testnet for Marlowe, and that this command will not supply
  funds on public networks.

Available options:
  --testnet-magic INTEGER  Network magic. Defaults to the CARDANO_TESTNET_MAGIC
                           environment variable's value.
  --socket-path SOCKET_FILE
                           Location of the cardano-node socket file. Defaults to
                           the CARDANO_NODE_SOCKET_PATH environment variable's
                           value.
  --lovelace LOVELACE      The lovelace to send to each address.
  --out-file FILE          Output file for transaction body.
  --submit SECONDS         Also submit the transaction, and wait for
                           confirmation.
  ADDRESS                  The addresses to receive the funds.
  -h,--help                Show this help text