> For the complete documentation index, see [llms.txt](https://docs.bio.xyz/bio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bio.xyz/bio/developers/utils/scripts.md).

# Scripts

### Overview

The project is designed to handle the following tasks:

* Retrieve auction contributors and their bid details.
* Identify successful contributors who were not outbid or cancelled.
* Track bio token holders and their balances.
* Generate airdrop lists based on successful contributions and bio-token holdings.
* Create a Merkle tree for the airdrop list to ensure secure and verifiable distribution.

Source code will soon be available in the Docs for community review and collaboration. Until that point, a breakdown of the modules can be found below

### Modules

#### index.ts

This is the main entry point of the application. It imports necessary modules and defines the `Contracts` type, which is used throughout the project to represent contract details. It also initializes contract data and orchestrates the execution of various functions to process auction and airdrop data.

#### getAuctionContributors.ts

This module retrieves auction contributors by fetching events from the blockchain. It processes logs to compile a list of users who participated in the auction, including their bid amounts and whether their bids were canceled or outbid. The results are saved to a CSV file.

#### getSuccessfulContributors.ts

This script reads the auction contributors' CSV file, filters out cancelled and outbid bids, and retrieves wallet addresses for successful contributors. It outputs a CSV file with user IDs, sell amounts, and wallet addresses.

#### getBioHolders.ts

This module tracks BIO token holders by scanning blockchain events for token transfers. It calculates the balance of each holder and outputs a CSV file listing accounts with positive balances.

#### getAirdropList.ts

This script generates an airdrop list by combining BIO token holders with successful auction contributors. It calculates the airdrop amount based on the sell amount, closing price, and distribution percentage. The results are saved to a CSV file.

#### createMerkleTree.ts

This module creates a Merkle tree from the airdrop list CSV file. It uses the OpenZeppelin Merkle tree library to generate a tree and save it to a JSON file, which can be used to verify airdrop claims.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bio.xyz/bio/developers/utils/scripts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
