# Using Antegen

Antegen lets you create simple Ante Tests without writing code! All you need to do is look up a few addresses. Here's how to do it:

### NFT balance check test

#### **NFT collection address**

To find the address of an NFT collection, go to the collection page on your preferred NFT marketplace and click “**View on Etherscan**”. (Some NFT marketplaces: [OpenSea](https://opensea.io/), [SuperRare](https://superrare.com/), [Rarible](https://rarible.com/))

<figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2F2zfT2xb8Mie8zWKw8f5k%2Fnft-link.png?alt=media&#x26;token=2d406c98-1b9c-402c-b5c0-c99d19758ffd" alt=""><figcaption><p>Etherscan link on various NFT marketplaces</p></figcaption></figure>

In Etherscan, click the “**Copy**” button by the contract address, then paste this into the "**NFT collection address**" field.

![](https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2F6Yd21PXtgjBLR17uYc6O%2Fetherscan.png?alt=media\&token=a3eb5ba4-96a9-445e-b06d-4d0250a239d3)

#### NFT holder address

From the NFT collection Etherscan page, click on the "**Token Tracker**" link:

<figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2F7bFn81XYKsIbxKBn82Lv%2FGroup%2024.png?alt=media&#x26;token=a49c7a78-7543-4789-a96e-39dda5fd6088" alt=""><figcaption></figcaption></figure>

Then select the "**Holders**" tab to view top holders of that NFT collection:

#### ![](https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FcXkZnPxuQrjBpuj9CyE3%2Fimage.png?alt=media\&token=fcf4aa70-3ea7-42aa-bc08-2da6ad1e109e)

#### Minimum balance held

Choose a number between 1 and the number of NFTs from the collection the holder currently holds.

If the holder has fewer than this number of NFTs from the collection, the test will fail.&#x20;

### Token balance check

#### Token address

Go to [Etherscan](https://etherscan.io/tokens) (or other block explorer for the chain) and select a token.

Under "**Other Info**", click the Copy icon next to "**Token Contract**" to copy the contract address.

![](https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FzZgodiLzOSdAs8DJK6EW%2FGroup%2023.png?alt=media\&token=ec1a5f2f-2e86-4926-9186-ce6a8e289672)

#### Token holder address

On the [Etherscan](https://etherscan.io/tokens) page for the token, click the "**Holders**" tab to view top token holders.

![](https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FIfcpUcxx97gx1BaKbVz0%2Fimage.png?alt=media\&token=5b36d6df-c272-4863-ab5a-ed2785ec573e)

Select one of the addresses and click the Copy icon to copy the holder address.

#### Minimum balance held

Choose a number between 1 and the current token balance of the holder.

If the holder's token balance drops below this number, the test will fail.&#x20;

### Submitting a Pull Request (PR)

If you used Antegen to generate code without deploying, here's how you can submit it to us:

1. Go to [tests.ante.xyz](http://tests.ante.xyz/) and click the "**Fork**" button (create a free GitHub account if necessary).

<figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FAsbKYedOhuY4dhxKi6ol%2Fimage.png?alt=media&#x26;token=b7ee34ba-40fb-4f49-861a-85ba35bc3da2" alt=""><figcaption></figcaption></figure>

2. Keep the default fork settings and click "**Create fork**"

<div align="center"><figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2Fd0sUST81Pfb97I2ADhmR%2Fimage.png?alt=media&#x26;token=d0b3c9ea-c149-4877-867b-5778bcd0e1c9" alt=""><figcaption></figcaption></figure></div>

3. In your forked repository, under "**Add file**", select "**Upload files**"

<figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FvM8MJ1Gd5PhRLiylAe44%2Fupload.png?alt=media&#x26;token=209c3f7c-b86c-4185-a9d0-c80c370cddda" alt=""><figcaption></figcaption></figure>

4. Upload the Antegen code file, enter a description, and click "**Commit changes**".
5. Open a pull request by clicking “**Contribute**” > “**Open pull request**”.

<figure><img src="https://3703626754-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYcWJGD2fAVyIUH34sMhH%2Fuploads%2FEfxoGIk8sLa4Ag0tT3fs%2Fimage.png?alt=media&#x26;token=4c7d0104-ad22-4edd-8ced-b202d94b239c" alt=""><figcaption></figcaption></figure>

6. Enter any comments for the reviewers and click “**Create pull request**” to submit your test. That’s it!
