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

# Mapping reference

> Every mapping in the current Shield Swap AMM program.

| Mapping                  | Key       | Value        | Lifecycle and use                                                                                |
| ------------------------ | --------- | ------------ | ------------------------------------------------------------------------------------------------ |
| `pools`                  | `field`   | `PoolState`  | Created once; updated when the pool is enabled or disabled                                       |
| `slots`                  | `field`   | `Slot`       | Mutable price, liquidity, fee, protocol-fee, and tick-walk state                                 |
| `ticks`                  | `field`   | `Tick`       | Keyed by a hash of `TickKey`; non-sentinel entries are removed when gross liquidity reaches zero |
| `initialized_pools`      | `field`   | `bool`       | Prevents duplicate pool creation                                                                 |
| `tick_spacings`          | `u32`     | `bool`       | Additive registry of approved spacings                                                           |
| `fee_tiers`              | `u16`     | `bool`       | Additive registry of approved fee pips                                                           |
| `fee_to_tick_spacing`    | `u16`     | `u32`        | Canonical spacing for new pools at a fee tier                                                    |
| `positions`              | `field`   | `Position`   | Keyed by position token ID; removed by `burn`                                                    |
| `swap_outputs`           | `field`   | `SwapOutput` | Pending single-hop or multi-hop claim; removed by `claim_swap_output`                            |
| `admin`                  | `bool`    | `address`    | Uses key `true` for the current admin                                                            |
| `pending_admin`          | `bool`    | `address`    | Uses key `true`; removed by `accept_admin`                                                       |
| `used_blinded_addresses` | `address` | `bool`       | Rejects reuse of a confidential address                                                          |
| `pool_creation_is_open`  | `bool`    | `bool`       | Uses key `true`; false means admin-only creation                                                 |
| `global_paused`          | `bool`    | `bool`       | Uses key `true`; pauses entry and trading across the AMM                                         |
| `token_allowed`          | `field`   | `bool`       | One-way pool-creation eligibility                                                                |
| `token_paused`           | `field`   | `bool`       | Token-wide entry and trading control                                                             |
| `pair_paused`            | `PairKey` | `bool`       | Pair-wide control across fee tiers                                                               |
| `frozen_position`        | `field`   | `u32`        | Stores the freeze block height; removed on unfreeze                                              |
| `from_wrapper_token_id`  | `field`   | `field`      | Maps an AMM wrapper token ID to its underlying token ID                                          |
| `to_wrapper_token_id`    | `field`   | `field`      | Maps an underlying token ID to its AMM wrapper token ID                                          |
| `pool_creators`          | `field`   | `address`    | Records the caller that created each pool                                                        |

The current contract has no `token_decimals` mapping. Token metadata and display decimals live in the off-chain registry and API.

## Current state and history

Mappings hold current consensus state. They are not logs. An indexer must preserve accepted transitions and removed values when historical reconstruction matters.

## Query behavior

Some finalizers use `get_or_use`, while others require a value through `get`. A client must match the exact entry-point behavior. It must not apply one default rule to every mapping.

## Key construction

* Pool keys hash sorted token IDs and the fee.
* Tick keys hash the pool key and tick.
* Pair-pause keys use sorted token IDs in a `PairKey`.
* Singleton controls use boolean key `true`.

See [Pools and identifiers](../concepts/pools-and-keys).
