<p>In the Alonzo update TransactionMetadata renamed to AuxiliaryData,
As you can see here</p>
<p><a href="https://github.com/Emurgo/cardano-serialization-lib/releases" rel="nofollow noreferrer">https://github.com/Emurgo/cardano-serialization-lib/releases</a></p>
<p>you should change this as well as some other definitions.</p>
<p>Good luck!</p>

CC BY-SA 4.0
2021-12-08T02:30:05.473Z
2021-12-08T02:30:05.473Z
Alicia Basilio
<h2>help
const METADATA = {
[policy.id]: {
[name.slice(0,32)]: {
...inputData.metadata
}
}
}</h2>
<p>const generalMetadata = Loader.Cardano.GeneralTransactionMetadata.new()
generalMetadata.insert(
Loader.Cardano.BigNum.from_str(&quot;721&quot;),
Loader.Cardano.encode_json_str_to_metadatum(JSON.stringify(metadata))
)
console.log(generalMetadata)
_metadata = Loader.Cardano.TransactionMetadata.new(generalMetadata)
rawTxBody.set_metadata_hash(Loader.Cardano.hash_metadata(_metadata))</p>
<p>thank.</p>

<cardano-cli><cardano-serialization-lib>
cardano_serialization_lib + GeneralTransactionMetadata error
# cardano_serialization_lib + GeneralTransactionMetadata error

(Asked by: username_0 on 2021-12-07)

## help const METADATA = { [policy.id]: { [name.slice(0,32)]: { ...inputData.metadata } } }

const generalMetadata = Loader.Cardano.GeneralTransactionMetadata.new()
generalMetadata.insert(
Loader.Cardano.BigNum.from\_str("721"),
Loader.Cardano.encode\_json\_str\_to\_metadatum(JSON.stringify(metadata))
)
console.log(generalMetadata)
\_metadata = Loader.Cardano.TransactionMetadata.new(generalMetadata)
rawTxBody.set\_metadata\_hash(Loader.Cardano.hash\_metadata(\_metadata))

thank.

**Tags:** cardano-cli, cardano-serialization-lib

---

## 1 answers

### Answer by username_1 on 2021-12-08. Score: 0

In the Alonzo update TransactionMetadata renamed to AuxiliaryData,
As you can see here

<https://github.com/Emurgo/cardano-serialization-lib/releases>

you should change this as well as some other definitions.

Good luck!


---

