> For the complete documentation index, see [llms.txt](https://docs.ees.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ees.xyz/concepts/sponsored-jobs.md).

# Sponsored jobs

Jobs can be *sponsored*, meaning that someone else than the owner pays the execution fee. By default, if a job is created without a sponsor, the owner is set as the sponsor, thus as the payer of execution fees. To sponsor a job, an EIP-712 signature over a specific `JobSpecification` has to be provided ias an argument to the `createJob` function in the `JobRegistry` contract:

```solidity
struct JobSpecification {
    uint256 nonce;
    uint256 deadline;
    IApplication application;
    uint32 executionWindow;
    bytes1 executionModule;
    bytes1 feeModule;
    bytes executionModuleInput;
    bytes feeModuleInput;
    bytes applicationInput;
}
```

The `createJob` function verifies the signature against the provided values, ensuring the sponsor that only a job with the agreed upon specification can be sponsored. Note that the parameter `applicationInput` is part of the signed struct. This is the same input data which is provided to the executable upon creation, which means that the sponsor is also guaranteed that even inputs to the application is a agreed upon.

The sponsor or owner of a job can at any time revoke the sponsorship, hereby setting the owner as the sponsor. Changing the fee module data in by calling `updateFeeModuleData` or migrating to a new fee module calling `migrateFeeModule` will automatically revoke the sponsorship, but a new sponsor can be set given a new signature signing a `FeeModuleInput` struct:

```solidity
struct FeeModuleInput {
    uint256 nonce;
    uint256 deadline;
    uint256 index;
    bytes1 feeModule;
    bytes feeModuleInput;
}
```

{% hint style="info" %}
**Note:** Signing a EIP-712 signature is a completely off-chain operation and will not incur gas cost.
{% endhint %}

{% hint style="info" %}
**Note:** Signatures of `JobSpecification` and `FeeModuleInput` share the same nonces, so make sure to always use unused nonces.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ees.xyz/concepts/sponsored-jobs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
