# delegateContract

**delegateContract**( `to`: <mark style="color:blue;">string</mark>, `contract`: <mark style="color:blue;">string</mark>, `rights`: <mark style="color:blue;">string</mark>, `enable`: <mark style="color:blue;">boolean</mark> ) ⇒ Promise< <mark style="color:blue;">TransactionHash</mark> >

&#x20;       Returns the transaction hash of the submitted delegation.

<table data-header-hidden><thead><tr><th width="124"></th><th></th></tr></thead><tbody><tr><td><strong>to</strong></td><td>The address to act as delegate</td></tr><tr><td><strong>contract</strong></td><td>The contract whose rights are being delegated</td></tr><tr><td><strong>rights</strong></td><td>Specific subdelegation rights granted to the delegate, pass <code>""</code> to encompass all rights</td></tr></tbody></table>

#### Usage Example

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