# Wave Factory

Wave Factory is the contract projects can use to deploy their custom campaigns. You can find the full code for the Wave Factory contract in [our public repo](https://github.com/FiveElementsLabs/tide-core-v2/blob/main/src/core/WaveFactory.sol).&#x20;

### Deploying a campaign

Every wallet can deploy a campaign contract by calling the `deployWave()` function on the Factory contract. The function takes as parameters:

* `_name(string)`: the name of the contract (which will be the name of the NFT collection)
* `_symbol(string)`: the symbol of the ERC-721 contract
* `_baseURI(string)`: the base URI of the folder which contains the NFT metadata
* `_startTimestamp(uint256)`: unix timestamp of campaign start time
* `_endTimestamp(uint256)`: unix timestamp of campaign end time
* `_isSoulbound(bool)`:  if `true`, the NFT released won't be transferrable
* `_claimRewards(TokenRewards[])`: array with the info for FCFS ERC-20 rewards
* `_raffleRewards(TokenRewards[])`: array with the info for raffle ERC-20 rewards

where the TokenRewards struct is defined as follows:

* `rewardsLeft(uint256)`: number of rewards still to be assigned
* `amountPerUser(uint256)`: amount of specified token distributed on each release
* `token(address)`: address of the reward ERC-20 token

**WARNING:** this page is for technical reference only, a contract deployed by calling directly the deployWave() function will NOT be supported by Tide frontend. If you are a project and you want to launch a campaign we suggest to use our [campaign creation tool](https://fiveelementslabs.gitbook.io/tide/projects/campaigns).


---

# Agent Instructions: 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:

```
GET https://fiveelementslabs.gitbook.io/tide/wave-factory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
