diff --git a/src/tx-format/index.md b/src/tx-format/index.md index b53e214d..bfc91a1f 100644 --- a/src/tx-format/index.md +++ b/src/tx-format/index.md @@ -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) diff --git a/src/tx-format/policy.md b/src/tx-format/policy.md index b03dbaea..c4b95b47 100644 --- a/src/tx-format/policy.md +++ b/src/tx-format/policy.md @@ -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)`