# Option 4: Buy Sentry Key via Node License Contract on Arbiscan

## Mint with ETH

1. Go to the Node License contract on Arbiscan:

{% embed url="<https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#readProxyContract#F24>" %}

2. Scroll down to the "24. price" function at the bottom of the page.
3. Enter the number of Keys you want to purchase in "amount" and your promo code in "\_promoCode" (Note: if you do not have a promo code you can put any string e.g. "na") to get the price.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FTYtRaza3NoQjIx1xIvXJ%2FScreenshot%202024-12-18%20at%209.29.05%E2%80%AFam.png?alt=media&#x26;token=943ae9e0-6643-46c5-822b-17b807909b14" alt=""><figcaption></figcaption></figure>
4. Click on the number next to uint256. In this example, the value 16459353290000000.
5. Find the ETH(1) row. In the screenshot, the value 0.01645935329![](https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FZ4VtCGkyVDhkT8yHZahi%2FScreenshot%202024-12-18%20at%209.29.26%E2%80%AFam.png?alt=media\&token=ca7f37c1-f271-4cb0-a5cb-6e2ca275efab)
6. Click on the Copy value button <img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FQZZZhNxDJKcNEvRoDcSN%2FScreenshot%202024-12-14%20at%208.51.41%E2%80%AFam.png?alt=media&#x26;token=060e6517-e7f1-4f11-979c-2bdc5521bb0d" alt="" data-size="line">
7. Go back to the Node License contract on Arbiscan: <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract>
8. Connect your Web3 wallet.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FovedagwbhvtYWJMSIIDf%2FScreenshot%202024-12-14%20at%209.07.03%E2%80%AFam.png?alt=media&#x26;token=998b0f22-d7d9-451a-9a63-4ea5ec5335cb" alt="" width="375"><figcaption></figcaption></figure>
9. Call the mint function <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract#F8>
   1. Paste in the value from Step 6 into the "mint" field

      <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2F3RwTTah16gZyxrFbDdsd%2FScreenshot%202024-12-14%20at%209.12.41%E2%80%AFam.png?alt=media&#x26;token=fb63bc96-d178-4c96-9ded-8a828630a000" alt="" width="375"><figcaption></figcaption></figure>
10. Enter the quantity of Keys you would like to purchase in the "\_amount (uint256)" field. Use the same amount you entered in Step 3.
11. Enter in your Promo Code in the "\_promoCode" field". Note: if you do not have a promo code you can put any string i.e. "na"
12. Click Write.
13. Approve the transaction in your wallet.

## Mint with USDC

{% hint style="success" %}
You can input a slightly higher amount to cover any slight price changes between steps. Any excess funds will be refunded
{% endhint %}

1. Go to the Node License contract on Arbiscan:

{% embed url="<https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#readProxyContract#F24>" %}

2. Use the "24. price" function at the bottom of the page.
3. Enter the number of Keys you want to purchase in "amount" and your promo code in "\_promoCode" (Note: if you do not have a promo code you can put any string e.g. "na") to get the price.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FTYtRaza3NoQjIx1xIvXJ%2FScreenshot%202024-12-18%20at%209.29.05%E2%80%AFam.png?alt=media&#x26;token=943ae9e0-6643-46c5-822b-17b807909b14" alt=""><figcaption></figcaption></figure>
4. Click on the number next to uint256. In this example, the value 16459353290000000.
5. Find the ETH(1) row. In the screenshot, the value 0.01645935329![](https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FZ4VtCGkyVDhkT8yHZahi%2FScreenshot%202024-12-18%20at%209.29.26%E2%80%AFam.png?alt=media\&token=ca7f37c1-f271-4cb0-a5cb-6e2ca275efab)
6. Click on the Copy value button <img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FQZZZhNxDJKcNEvRoDcSN%2FScreenshot%202024-12-14%20at%208.51.41%E2%80%AFam.png?alt=media&#x26;token=060e6517-e7f1-4f11-979c-2bdc5521bb0d" alt="" data-size="line">
7. Get the latest quote for ETH / USD
   1. The NodeLicense will use the price oracle at <https://arbiscan.io/address/0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612#readContract#F8>
   2. Use `latestAnswer` to get the current ETH / USD value (Note this is with 8 decimals)

      <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2F7sKdCX9rrpfZs2Fu9HW5%2FScreenshot%202024-12-18%20at%209.48.14%E2%80%AFam.png?alt=media&#x26;token=806b7272-5d56-42c0-9d58-c24eb2e271e9" alt=""><figcaption></figcaption></figure>
   3. Calculate `latestAnswer`  x `price` (from step 4)
8. Go back to the Node License contract on Arbiscan: <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract>
9. Connect your Web3 wallet.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FovedagwbhvtYWJMSIIDf%2FScreenshot%202024-12-14%20at%209.07.03%E2%80%AFam.png?alt=media&#x26;token=998b0f22-d7d9-451a-9a63-4ea5ec5335cb" alt="" width="375"><figcaption></figcaption></figure>
10. Call mintToWithUSDC - <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract#F10>
    1. Paste in the value from Step 7 (c) into the *"\_*&#x65;xpectedCostUSDC" field.

       <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2Fm2OQW8f1JH55Wqdr34wo%2FScreenshot%202024-12-14%20at%208.58.42%E2%80%AFam.png?alt=media&#x26;token=60266873-67eb-493c-aa4b-98300ba39e12" alt="" width="375"><figcaption></figcaption></figure>
11. Enter the quantity of Keys you would like to purchase in the "\_amount (uint256)" field. Use the same amount you entered in Step 3.
12. Enter in your Promo Code in the "\_promoCode" field". Note: if you do not have a promo code you can put any string in
13. Enter in the wallet that will own the key in the "\_to" field".
14. Click Write.
15. Approve the transaction in your wallet.

## Mint with XAI/esXAI

{% hint style="success" %}
You can input a slightly higher amount to cover any slight price changes between steps. Any excess funds will be refunded
{% endhint %}

### 1. Get the Price

1. Go to the Node License contract on Arbiscan:

{% embed url="<https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#readProxyContract#F24>" %}

2. Scroll down to the "24. price" function at the bottom of the page.
3. Enter the number of Keys you want to purchase in "amount" and your promo code in "\_promoCode" (Note: if you do not have a promo code you can put "na") to get the price.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FTYtRaza3NoQjIx1xIvXJ%2FScreenshot%202024-12-18%20at%209.29.05%E2%80%AFam.png?alt=media&#x26;token=943ae9e0-6643-46c5-822b-17b807909b14" alt=""><figcaption></figcaption></figure>
4. Click on the number next to uint256. In this example, the value [16459353290000000](https://arbiscan.io/unitconverter?wei=16459353290000000).
5. Find the ETH(1) row. In the screenshot, the value 0.01645935329![](https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FZ4VtCGkyVDhkT8yHZahi%2FScreenshot%202024-12-18%20at%209.29.26%E2%80%AFam.png?alt=media\&token=ca7f37c1-f271-4cb0-a5cb-6e2ca275efab)
6. Click on the Copy value button <img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FQZZZhNxDJKcNEvRoDcSN%2FScreenshot%202024-12-14%20at%208.51.41%E2%80%AFam.png?alt=media&#x26;token=060e6517-e7f1-4f11-979c-2bdc5521bb0d" alt="" data-size="line">
7. Input into the function `10. ethToXai` the value you got from Step 5, in this example: <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#readProxyContract#F10>

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FihWXPGNqtFxYyScrMMoC%2FScreenshot%202024-12-18%20at%2011.28.44%E2%80%AFam.png?alt=media&#x26;token=c4b2a443-4ba1-4fa5-b5e2-34583b31e474" alt=""><figcaption></figcaption></figure>
8. Find the ETH(1) row. In the screenshot, the value 215.942123600761418936![](https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FPTB5izIdjZVIMO2IKwxe%2FScreenshot%202024-12-18%20at%2011.27.46%E2%80%AFam.png?alt=media\&token=670663bb-f017-46b7-9681-6eb7de9823bb)
9. Click on the Copy value button <img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FQZZZhNxDJKcNEvRoDcSN%2FScreenshot%202024-12-14%20at%208.51.41%E2%80%AFam.png?alt=media&#x26;token=060e6517-e7f1-4f11-979c-2bdc5521bb0d" alt="" data-size="line">
10. **At this point, you have the total XAI/esXAI amount required to mint your keys.**

### 2. Approve the NodeLicense Contract as a Spender

You need to allow the NodeLicense contract to spend your XAI or esXAI tokens before minting. You can do this either directly from the key sale page (if available) or via Arbiscan.

#### Approving XAI

1\. Go to the XAI contract `Write Proxy` page: <https://arbiscan.io/address/0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66#writeProxyContract>

2\. Connect your wallet.

3\. Find the **`1. approve`** function. <https://arbiscan.io/address/0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66#writeProxyContract#F1>

\- `spender`: [`0xbc14d8563b248B79689ECbc43bBa53290e0b6b66`](https://arbiscan.io/address/0xbc14d8563b248b79689ecbc43bba53290e0b6b66) (NodeLicense address)

\- `amount`: The XAI amount you got from Step 1.

4\. Submit the transaction to approve spending.

#### Approving esXAI

1\. Go to the esXAI contract \*\*Write Proxy\*\* page: <https://arbiscan.io/address/0x4C749d097832DE2FEcc989ce18fDc5f1BD76700c#writeProxyContract>

2\. Connect your wallet.

3\. Find the **`2. approve`** function. <https://arbiscan.io/address/0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66#writeProxyContract#F1>

\- `spender`: [`0xbc14d8563b248B79689ECbc43bBa53290e0b6b66`](https://arbiscan.io/address/0xbc14d8563b248b79689ecbc43bba53290e0b6b66) (NodeLicense address)

\- `amount`: The esXAI amount you got from Step 1.

4\. Submit the transaction to approve spending.

### 3.  Mint Your Keys

2. Go back to the Node License contract on Arbiscan: <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract>
3. Connect your Web3 wallet.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FovedagwbhvtYWJMSIIDf%2FScreenshot%202024-12-14%20at%209.07.03%E2%80%AFam.png?alt=media&#x26;token=998b0f22-d7d9-451a-9a63-4ea5ec5335cb" alt="" width="375"><figcaption></figcaption></figure>
4. Find the `mintWithXAI` function - <https://arbiscan.io/address/0xbc14d8563b248B79689ECbc43bBa53290e0b6b66#writeProxyContract#F13>
5. Paste in the value from Step 9 into the "\_*expectedCost"* field.

   <figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FA4zCRQUGdopar4mwRz13%2FScreenshot%202024-12-14%20at%208.58.50%E2%80%AFam.png?alt=media&#x26;token=2fc3f744-8a22-40af-ad7e-2b1fa8a01ff7" alt="" width="375"><figcaption></figcaption></figure>
6. Enter the quantity of Keys you would like to purchase in the "\_amount (uint256)" field. Use the same amount you entered in Step 3.
7. Enter in your Promo Code in the "\_promoCode" field". Note: if you do not have a promo code you can put any string in
8. Enter in the wallet that will own the key in the "\_to" field"
9. Choose if you are using EsXai or Xai for the purchase set \_useEsXai as either `true` or `false`
   1. `true` if you're using esXAI for payment
   2. `false` if you're using XAI
10. Click Write.
11. Approve the transaction in your wallet.
12. **You've now successfully minted your keys using XAI/esXAI.**
