# checkDelegateForContract

**checkDelegateForContract**( `to`: <mark style="color:blue;">string</mark>, `from`: <mark style="color:blue;">string</mark>, `contract`: <mark style="color:blue;">string</mark>, `rights?`: <mark style="color:blue;">string</mark> ) ⇒ Promise< <mark style="color:blue;">boolean</mark> >

&#x20;       Returns `true` if delegate is granted to act on from's behalf for entire wallet or that specific contract

<table data-header-hidden><thead><tr><th width="124"></th><th></th></tr></thead><tbody><tr><td><strong>to</strong></td><td>The delegated address to check</td></tr><tr><td><strong>from</strong></td><td>The potential address who delegated rights</td></tr><tr><td><strong>contract</strong></td><td>The address for the contract you're delegating</td></tr><tr><td><strong>rights</strong> <em>(optional)</em></td><td>Specific rights to check for, pass nothing to ignore subdelegations and check full delegations only</td></tr></tbody></table>

#### Usage Example

```javascript
const to = "0x0000000000000000000000000000000000000003";
const from = "0x0000000000000000000000000000000000000001";
const contract = "0x0000000000000000000000000000000000000002";
const isDelegateForContract = await v2.checkDelegateForContract(to, from, contract);

/* returns example

true

*/
```


---

# Agent Instructions: 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:

```
GET https://docs.delegate.xyz/technical-documentation/javascript-sdk/check-delegations/checkdelegateforcontract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
