Skip to content

Commit

Permalink
Include Policy in Tx table of contents, include info on max_fee req…
Browse files Browse the repository at this point in the history
…uirements
  • Loading branch information
MitchTurner committed Mar 4, 2024
1 parent 85f98ab commit 9e5ef30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/tx-format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ The Fuel Transaction Format.
- [`OutputVariable`](./output.md#outputvariable)
- [`OutputContractCreated`](./output.md#outputcontractcreated)
- [`Witness`](./witness.md)
- [`Policy`](./policy.md)
- [`TXPointer`](./tx-pointer.md)
7 changes: 4 additions & 3 deletions src/tx-format/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ Transaction is invalid if:

## `MaxFee`

| name | type | description |
|-----------|----------|-----------------------------------------------------------------|
| `max_fee` | `uint64` | The maximum fee payable by this transaction using `BASE_ASSET`. |
| name | type | description |
|-----------|----------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `max_fee` | `uint64` | The maximum fee payable by this transaction using `BASE_ASSET`. This is used to check transactions before the actual `gas_price` is known. |

Transaction is invalid if:

- `max_fee` is not set
- `max_fee > sum_inputs(tx, BASE_ASSET_ID) - sum_outputs(tx, BASE_ASSET_ID)`
- `max_fee < reserved_fee_balance(tx, BASE_ASSET_ID)`

0 comments on commit 9e5ef30

Please sign in to comment.