Categories
Uncategorized

Create NFT in cardano-testnet

Note : Assets name should in base16

https://forum.cardano.org/t/error-while-minting-nft-transaction-using-full-node/84784

Read the docs carefully : https://developers.cardano.org/docs/native-tokens/minting-nfts

Categories
Uncategorized

Create metadata transcation in cardano testnet

cat metadata.json
{    
    "1": {"data": "hello cardano"}
}


cardano-cli query utxo --testnet-magic 1097911063 --address $(cat payment.addr)

999825831

cardano-cli transaction build-raw \
--tx-in d80a355f11d26025802a74f614c06f3a1eb347d9be489fcf2048989f9ce34bed#0 \
--tx-out $(cat payment.addr)+0 \
--metadata-json-file metadata.json \
--fee 0 \
--out-file tx.draft


cardano-cli query protocol-parameters \
    --testnet-magic 1097911063 \
    --out-file protocol.json


cardano-cli transaction calculate-min-fee \
--tx-body-file tx.draft \
--tx-in-count 1 \
--tx-out-count 1 \
--witness-count 1 \
--byron-witness-count 0 \
--testnet-magic 1097911063 \
--protocol-params-file protocol.json

fee : 175005

999825831-175005 = 999650826
    

cardano-cli transaction build-raw \
--tx-in d80a355f11d26025802a74f614c06f3a1eb347d9be489fcf2048989f9ce34bed#0 \
--tx-out $(cat payment.addr)+999650826 \
--metadata-json-file metadata.json \
--fee 175005 \
--out-file tx.draft

cardano-cli transaction sign \
--tx-body-file tx.draft \
--signing-key-file payment.skey \
--testnet-magic 1097911063 \
--out-file tx.signed


cardano-cli transaction submit \
--tx-file tx.signed \
--testnet-magic 1097911063

More = https://developers.cardano.org/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli/

https://github.com/input-output-hk/cardano-node/blob/master/doc/stake-pool-operations/simple_transaction.md