3

I am trying to mint a token in cardano mainnet. I have built a block and staking pool. I am working to mint a token and i am running into an error "unexpected '2', expecting space, "+" or end of input.

Here is the linux code I'm running:

cardano-cli transaction build-raw  --shelley-era  --fee $fee  --tx-in $txhash#$txix  --tx-out $address+$output+"$tokenamount $policyid.$tokenname1"  --mint="$tokenamount $policyid.$tokenname1"  --minting-script-file policy/policy.script --out-file matx.raw

Here is the error:

option --tx-out: unexpected '2' expecting space, "+" or end of input

Inputs: I have tried different outputs of 10000000, 5000000, and 0.

$tokenamount="10000000"

$address=$(cat payment.addr)

$tokenname1="CpoolTest"

https://developers.cardano.org/docs/native-tokens/minting/

Please help

1 Answers1

0

I guess i found the error.

Check $policyid whats inside. It should contain only 1x adress.

Try echo $policyid. It should only display 1 address

If its not the case, yo can try:

to delete your policyID:

rm -rf policy/policyID

After deleting create a brand new one:

cardano-cli transaction policyid --scriptfile ./policy/policy.script >> policy/policyID

Now set the variable:

policyid=$(cat policy/policyID)

Echo it

echo $policyid

There should be exactly 1 address displayed. Your code should work now

bill.gates
  • 14,145
  • 3
  • 19
  • 47