Using Antegen
Last updated
Last updated
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:
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, SuperRare, Rarible)
In Etherscan, click the “Copy” button by the contract address, then paste this into the "NFT collection address" field.
From the NFT collection Etherscan page, click on the "Token Tracker" link:
Then select the "Holders" tab to view top holders of that NFT collection:
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.
Go to Etherscan (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.
On the Etherscan page for the token, click the "Holders" tab to view top token holders.
Select one of the addresses and click the Copy icon to copy the holder address.
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.
If you used Antegen to generate code without deploying, here's how you can submit it to us:
Go to tests.ante.xyz and click the "Fork" button (create a free GitHub account if necessary).
Keep the default fork settings and click "Create fork"
In your forked repository, under "Add file", select "Upload files"
Upload the Antegen code file, enter a description, and click "Commit changes".
Open a pull request by clicking “Contribute” > “Open pull request”.
Enter any comments for the reviewers and click “Create pull request” to submit your test. That’s it!