# SETUP

## SETUP APELLO TOKEN GATING

1. Invite Apello from here <https://www.apello.xyz/>.<br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FDcoAjXRge5qxD3uFrJmm%2Fimage.png?alt=media&#x26;token=9fbfce79-8067-421a-ab31-8298edf99111" alt=""><figcaption><p>Apello webapp</p></figcaption></figure>
2. Create a channel in your discord ex: #apello-token-gating.<br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2F8kk2bObE93aU5v7YQ3Sh%2Fimage.png?alt=media&#x26;token=e2439850-ba10-45f5-af65-d49dc43d0acd" alt=""><figcaption><p>Discotrd channel</p></figcaption></figure>
3. Make sure to add the bot to the channel & give it the needed permissions.

   * [x] View Channel
   * [x] Send Messages
   * [x] Attach Files
   * [x] Embed Links
   * [x] Use Application Commands

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FZ8EIyuD9jFX9Rf5PhV1B%2Fimage.png?alt=media&#x26;token=1236b65a-6f66-4ac3-86a2-9ed2c88173dd" alt=""><figcaption><p>Channel settings</p></figcaption></figure>
4. Create a role **Apello Manager** to be able to run admin commands.<br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FZZVcMmse4TiIrTuA5TBs%2Fimage.png?alt=media&#x26;token=e289f621-7fa9-4ab1-9ef4-93d26cd3c9fa" alt=""><figcaption><p>Discord roles</p></figcaption></figure>
5. Add to yourself the **Apello Manager** role.<br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2Ff58r2wb5ZTLyKFRI22SD%2Fimage.png?alt=media&#x26;token=55647943-8987-4b4b-8e67-0cfae1ff9941" alt=""><figcaption><p>Add memebers to a role</p></figcaption></figure>
6. Go to the channel you just created for Apello and run **/set-channel channel:** \
   &#x20;  &#x20;

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2Fz6pbLSTA7o1hQSd9S72T%2Fimage.png?alt=media&#x26;token=3522bd3e-75ef-409c-9b7e-e020eac380f3" alt=""><figcaption><p>Verify embed</p></figcaption></figure>
7. Now get the NFT contract and create the role you want to assign to the holders unless you already have one.

   1. From **Terra**: [https://knowhere.art/collections/**terra17vysjt8ws64v8w696mavjpqs8mksf8s993qghlust9yey8qcmppqnhgw0e**](https://knowhere.art/collections/terra17vysjt8ws64v8w696mavjpqs8mksf8s993qghlust9yey8qcmppqnhgw0e)
   2. From **Juno**: <https://nft.juno.loop.markets/nftDetail/**juno1qnmgent6fmw8rufz978rhmzfgmvme9gvyj0t7rkpffklvwr9tteste35lg**/Tradooors.3133>
   3. From **Stargaze**:\
      [https://www.stargaze.zone/marketplace/**stars18d7ver7mmjdt06mz6x0pz09862060kupju75kpka5j0r7huearcsq0gyg0**?sort=price\_asc\&saleType=fixed\_price](https://www.stargaze.zone/marketplace/stars18d7ver7mmjdt06mz6x0pz09862060kupju75kpka5j0r7huearcsq0gyg0?sort=price_asc\&saleType=fixed_price)
   4. From **Tori**:&#x20;

      [https://app.teritori.com/collection/tori-**tori167xst2jy9n6u92t3n8hf762adtpe3cs6acsgn0w5n2xlz9hv3xgs4ksc6t**](https://app.teritori.com/collection/tori-tori167xst2jy9n6u92t3n8hf762adtpe3cs6acsgn0w5n2xlz9hv3xgs4ksc6t)
   5. From **OmiFlix**:

      [https://omniflix.market/c/**onftdenomd31438643b014daab97c7c574df674bc**](https://omniflix.market/c/onftdenomd31438643b014daab97c7c574df674bc)
   6. EVM **Forma**: You can copy the cotract from here <https://explorer.forma.art/tokens>

   <br>
8. run **/set-contract-role** <br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FB25fP3JkkJtxzg0yw4pq%2Fimage.png?alt=media&#x26;token=361e682f-db9c-47a4-a266-d026a6f4dda1" alt=""><figcaption></figcaption></figure>

   1. **Blockchain**: the blockchain of your collection - choose one from the dropdown menu.
   2. **Role**: The role you want to assign to the holder - choose from the dropdown menu.
   3. **Contract**: Your NFT contract (Check step 7)
      1. Please note that for **ERC-1155 tokens**, you can specify the ID by adding it to the contract as below:

         <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FJulwovoa3fUm8f5Jh8Qw%2Fimage.png?alt=media&#x26;token=85b30b56-4f02-4f19-af3c-906855b47051" alt=""><figcaption></figcaption></figure>
   4. **Number\_of\_tokens**: The number of NFTs the user should hold to get the role.\ <br>
9. Make sure to drag **`Apello's`**&#x72;ole (Bot's role) above all the roles you mentioned in step 8.

{% hint style="info" %}
Step 9 is very important! because Discord bots can't assign roles higher than their role.
{% endhint %}

<br>

You are good to go now! you can click the **verify** button to get your special role congratulations 🎉<br>

<figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FNZ3adofZPJtue42iAXRn%2Fimage.png?alt=media&#x26;token=62dedf3d-04b4-4b56-876e-449e3adff51b" alt=""><figcaption></figcaption></figure>

&#x20;

## SETUP APELLO TRAIT GATING

1. Create a channel for Apello Trait Gating and follow the steps from 2-5 in [#setup-apello-token-gating](#setup-apello-token-gating "mention") <br>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2F4Z1ytVYZu9O8PXyBBFQq%2Fimage.png?alt=media&#x26;token=8e873205-9be2-4828-a0cf-6bc9eff1269e" alt=""><figcaption></figcaption></figure>

2. Set up the channel where the trait gating bot will work using /set-trait-holder-channel

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FNpefdThTIBUFvzJ7fFb8%2Fimage.png?alt=media&#x26;token=6581c27e-07b6-444b-9b92-495d659574a2" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FGbNB9zjKHs1EJ6g3uPEm%2Fimage.png?alt=media&#x26;token=6af37f8a-44d8-4960-94a0-e3b26ab7a7d0" alt=""><figcaption></figcaption></figure>

3. Now add the trait you want to track using /set-contract-trait-role

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2FP4jF5p4mVx4zzsliderg%2Fimage.png?alt=media&#x26;token=0a92f7c4-e2d1-4bca-b032-fd76009a3b90" alt=""><figcaption></figcaption></figure>

   You can get the trait value from here:&#x20;

   <figure><img src="https://818983483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5pQr0a8wcw49xYmE62K%2Fuploads%2F9IQBHKAmzFSzIiJJ49io%2Fimage.png?alt=media&#x26;token=0c2d2259-6498-4914-aca8-56db475c5aed" alt=""><figcaption></figcaption></figure>

4. Now All you need to do is get the ID of the NFT you hold with the trait you are trying to verify.\
   You can get it from the NFT link : \
   <https://www.stargaze.zone/marketplace/stars1yrpjz5cu5vemal70p686jk6cyj8aktuz8qkcg7xvvlalr90pxhqqvc4zy9/3065> \
   In this example, The NFT ID is **3065.**<br>

5. Click the **verify-trait** button in the Apello embed and submit the ID above. <br>

{% hint style="warning" %}
Steps 2, 3, 4, 5 & 9 are similar for both [#setup-apello-token-gating](#setup-apello-token-gating "mention") & [#setup-apello-trait-gating](#setup-apello-trait-gating "mention")&#x20;
{% endhint %}

\
\
\ <br>
