> ## Documentation Index
> Fetch the complete documentation index at: https://developers.stellar.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Write metadata for your contract

> Use the contractmeta! macro in Rust SDK to write metadata in Wasm contracts

The [`contractmeta!`] macro provided in the Rust SDK allows users to write two strings - a `key` and a `val` - within a serialized `SCMetaEntry::SCMetaV0` XDR object to the custom section of Wasm contracts. The section name for this metadata is `contractmetav0`. Developers can utilize this macro to write metadata, and tools can then read and display this information to users.

The [liquidity pool example] provides a clear demonstration of how to use the `contractmeta!` macro:

```rust theme={"theme":{"light":"github-light","dark":"github-dark"}}
// Metadata that is added on to the Wasm custom section
contractmeta!(
    key = "Description",
    val = "Constant product AMM with a .3% swap fee"
);

pub trait LiquidityPoolTrait {...
```

[`contractmeta!`]: https://docs.rs/soroban-sdk/22.0.4/soroban_sdk/macro.contractmeta.html

[liquidity pool example]: https://github.com/stellar/soroban-examples/blob/v22.0.1/liquidity_pool/src/lib.rs#L152-L155
