playing around with the minting example from the Alonzo-testnet repository, once compiled I realized I have no idea on how to interact with it from the cli
trying to construct a transaction as follows
cardano-cli transaction build \
--alonzo-era \
--protocol-params-file path/to/protocol-parameters.json \
--tx-in <mint-script-address utxo (or is it optional when minting?)> \
--mint {"map":{"k":{"bytes": "<policy>"}, "v": {"map":{"k":{"string": "tokenName"},"v":{"int": 1000 }}}}} \
--mint-script-file path/to/minting-policy-purple.plutus \
--mint-redeemer-file mint-redeemer.json \
--tx-in-collateral <payment.addr utxo> \
--change-address $(cat path/to/payment.addr) \
--$testnet \
--out-file tx.raw
where mint-redeemer.json
is just a simple constructor:
{
"constructor": 0,
"fields": []
}
so my questions are:
- do I need a
--tx-in
when minting? - what is
VALUE
in the--mint
option? - how is
--mint-redeemer-file
'sFILE
supposed to look like?
EDIT:
just to be clear, the second question is due to the fact that running the above command I get the following error message
option --mint:
unexpected "{"
expecting multi-asset value expression
I assumed a multiasset value expression is similar to the Value
definition in Plutus; meaning it should be
Map (CurrencySymbol, ( Map ( TokenName, Amount ) )