> For the complete documentation index, see [llms.txt](https://waxdao.gitbook.io/wax-smart-contract-development-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://waxdao.gitbook.io/wax-smart-contract-development-guide/tips-and-tricks/eosio.code-permission.md).

# eosio.code Permission

If you're unfamiliar with the `eosio.code` permission, it is a special permisssion the **must** be added to your contract if you want that contract to be able to execute inline actions on other contracts.

For example:

* Your contract receives an asset (does not require eosio.code)
* Your contract checks some things, and puts some data into a table (does not require eosio.code)
* Your contract then needs to send tokens to a user (requires eosio.code)

Adding this permission is quite simple, I will show you 3 different ways to do it.

### cleos

If you've installed the WAX Contract Development Toolkit on your machine (i.e. if you compile your contracts locally), then you can add this permission using a simple command.

```bash
cleos -u <endpoint> set account permission <account_name> active --add-code -p <account_name>@active
```

An example with the parameters filled in:

```bash
cleos -u https://api.waxdaobp.io set account permission waxdao active --add-code -p waxdao@active
```

### Block Explorer

You can also add this permission manually using a block explorer, such as [waxblock.io](https://waxblock.io/)

First, log into waxblock and go to [waxblock.io/wallet/permissions/advanced](https://waxblock.io/wallet/permissions/advanced). Next, click on the "Change Permission" menu, and click "active".

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FgLflrcZvMezsnYq2DYdr%2FScreen%20Shot%202024-06-16%20at%203.38.36%20PM.png?alt=media&amp;token=d658d152-ddd0-4325-93a5-5c77984c6cbd" alt=""><figcaption></figcaption></figure>

You should see a list of your current active keys on the page now. The important thing to keep in mind here, is **do not remove or replace the existing keys!** What you want to do is click the "Add New +" button.

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FYTv4vvhLLom8yKOZ8keD%2FScreen%20Shot%202024-06-16%20at%203.41.08%20PM.png?alt=media&amp;token=ae780529-cd3f-4af3-bb52-c47746f780bc" alt=""><figcaption></figcaption></figure>

After clicking this, a new empty row should pop up on the page.

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FjREAsSBliQsfvdcMxoPq%2FScreen%20Shot%202024-06-16%20at%203.41.54%20PM.png?alt=media&amp;token=8540851f-ba40-4d71-989d-10eb4e15026b" alt=""><figcaption></figcaption></figure>

Under the "Type" menu, there is an option called "Account". Select that.

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FL9dMJuh3e2SCXAqO7JEd%2FScreen%20Shot%202024-06-16%20at%203.42.41%20PM.png?alt=media&amp;token=17979f0e-2fe3-4dbc-8728-517d5d13a597" alt=""><figcaption></figcaption></figure>

Then, in the "Public Key" menu, type `<account_name>@eosio.code`

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FneGnehHijOZmJE5iQnTo%2FScreen%20Shot%202024-06-16%20at%203.43.26%20PM.png?alt=media&amp;token=ec74c73f-d8cb-40a9-bc20-c859c1744d65" alt=""><figcaption></figcaption></figure>

It's worth mentioning one more time - **you should still have your existing keys** shown on the page, along with the new one you are adding. If you only see the new one, abort!

The next step is to actually submit the transaction - click on the "Update Permission" button, and sign the transaction.

<figure><img src="https://1806487070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F96V7Qnmz0N0yINAZL4VM%2Fuploads%2FXOBgLTLYLb0liVF0Hv8j%2FScreen%20Shot%202024-06-16%20at%203.46.39%20PM.png?alt=media&amp;token=6a31615a-f8ab-45f9-b980-dc17f399072a" alt=""><figcaption></figcaption></figure>

And that's it, your done! If you go to your account page on waxblock, and click on the "Keys" tab, you should now see the `eosio.code` account under the "Active" permission. If that's the case, your contract is now able to create inline actions without throwing any errors.

### wax-tools.naw\.io

Another option is to use a third party tool built by Nick Kusters, a developer who has been active on WAX for years.

That tool is [wax-tools.naw.io](https://wax-tools.naw.io/). It's pretty straightforward, so doesn't require much of an explanation here. Just log into the site, click the `eosio.code` tab, and follow the instructions.
