# Developer

## Faucet Bridge <a href="#faucet-bridge" id="faucet-bridge"></a>

**BMCFaucetBridge.sol** acts as a bridge between the Ethereum network and the Boomchain network, allowing users to deposit Ethereum-based tokens (ETH, WBTC, USDC).&#x20;

*These tokens can be withdrawn from the contract only through the assigned contract owner.*

*These supported tokens are hardcoded in the constructor and cannot be changed.*

**Key features**

* `buyBMCWithETH`: A function to exchange ETH for BMC, requiring a transaction nonce, the amount of ETH, and a frontend signature.
* `buyBMCWithToken`: A function to exchange USDC, WBTC for BMC, requiring a transaction nonce, the token amount, and a frontend signature.
* **Signature Verification**: Emphasizes the use of transaction signatures to authenticate operations initiated **through a frontend interface**.
* **Pausable**: Inherits from OpenZeppelin's Pausable contract, allowing the contract's operations to be paused by the owner for emergency or maintenance reasons.
* **Ownership**: Utilizes OpenZeppelin's Ownable contract to restrict certain operations (like pausing the contract) to the owner.

{% hint style="warning" %}
**For operations like token exchange, signatures may be required to verify transactions initiated through the frontend**. The use of signatures and nonces focus on security, preventing replay attacks and ensuring transactions are authentic.
{% endhint %}

## Settlement <a href="#settlement" id="settlement"></a>

**Settlement.sol** is a contract on the Boomchain network that acts as a settlement layer for the Boomswap Faucet where assets (bUSD, bETH or bBTC) are swapped for BMC. This process begins when a user deposits corresponding tokens into the faucet bridge on the Ethereum chain. Subsequently, BMC is issued to the user's address that was used to interact with the faucet bridge.

> To enable the swapping of these tokens (bUSD, bETH, and bBTC) for BMC, it is essential that the Settlement contract is is adequately funded with bUSD, bETH, and bBTC to be able to swap these tokens for BMC through **Boomswap**.

*These supported tokens are hardcoded in the constructor and cannot be changed.*

**Access Control** - Only accounts with specific roles can initiate certain operations:

* **Owner** can pause the contract, resolve and swap tokens for BMC, and withdraw funded tokens from the contract.
* **Bridger** initiates the token swap operation and can be the frontend signer address.

***

{% content-ref url="/pages/FBqVw68OYEhBLncrvvu8" %}
[Contracts](/reference/contracts.md)
{% endcontent-ref %}


---

# 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://docs.boom.market/boom-blockchain/boom-faucet/developer.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.
