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

# Fees

> Calculates, validates, and manages fees related to posting actions.

```rust theme={null}
use std::string;
use std::type_name;
use sui::coin;
use sui::event;
use sui::sui;
use sage_admin::admin;
use sage_admin::apps;
```

<Tip>
  Explore this module further in the Mover Registry: @sage/post
</Tip>

## Structs

### `PostFees`

Holds the fee amounts for `Post` actions.

```rust theme={null}
public struct PostFees has key
```

<Expandable title="Fields">
  ```rust theme={null}
    id: sui::object::UID,
    app: address,
    custom_coin_type: std::type_name::TypeName,
    like_post_fee_custom: u64,
    like_post_fee_sui: u64,
    post_from_post_fee_custom: u64,
    post_from_post_fee_sui: u64
  ```
</Expandable>

## Events

### `PostFeesCreated`

Emitted when a new `PostFees` is created.

```rust theme={null}
public struct PostFeesCreated has copy, drop
```

<Expandable title="Fields">
  ```rust theme={null}
    app_id: address,
    post_fees_id: address,
    custom_coin_type: std::type_name::TypeName,
    like_post_fee_custom: u64,
    like_post_fee_sui: u64,
    post_from_post_fee_custom: u64,
    post_from_post_fee_sui: u64
  ```
</Expandable>

### `PostFeesUpdated`

Emitted when a `PostFees` is updated.

```rust theme={null}
public struct PostFeesUpdated has copy, drop
```

<Expandable title="Fields">
  ```rust theme={null}
    post_fees_id: address,
    custom_coin_type: std::type_name::TypeName,
    like_post_fee_custom: u64,
    like_post_fee_sui: u64,
    post_from_post_fee_custom: u64,
    post_from_post_fee_sui: u64
  ```
</Expandable>

## Constants

Incorrect coin type passed in for the `custom_coin`.

```rust theme={null}
const EIncorrectCoinType: u64 = 370;
```

Incorrect amount of `custom_coin`.

```rust theme={null}
const EIncorrectCustomPayment: u64 = 371;
```

Incorrect amount of `sui_coin`.

```rust theme={null}
const EIncorrectSuiPayment: u64 = 372;
```
