Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
hashxtree committed Dec 19, 2024
1 parent c48e591 commit 286c213
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
<img alt="Ethers" src="https://img.shields.io/badge/^6.4.0-ethers-darkblue">
</div>

<div>
<img alt="Page cover image" src="https://docs.lombard.finance/~gitbook/image?url=https%3A%2F%2F2727780006-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FshysQ5d1rHU8C0eDQoLF%252Fuploads%252FR5w80vSnwar9rZZVywo7%252FGitbook%2520cover.png%3Falt%3Dmedia%26token%3Dab258017-4138-4430-8e63-d17ecd35f7b6&amp;width=1248&amp;dpr=4&amp;quality=100&amp;sign=16bc71e&amp;sv=2"/>
</div>

# Lombard Finance EVM smart-contracts
[Website](https://www.lombard.finance/) | [Docs](https://docs.lombard.finance/)

Expand Down
44 changes: 44 additions & 0 deletions docs/mint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Mint LBTC

This action mints deposited `BTC` in `LBTC` tokens.

## Prerequisites

Before performing the following steps, the offchain part of the protocol must be executed:
1. Generate deposit bitcoin address.
2. Send `BTC` to deposit bitcoin address.
3. Wait for required block confirmations on bitcoin network.
4. Receive notarization result of your deposit (includes special payload and array of notaries signatures)

## Send mint tx

### Function: `mint(bytes calldata payload, bytes calldata proof)`
Mints `LBTC` by proving a notarized `DEPOSIT_BTC_ACTION` as payload.

**Example:**

```typescript
await lbtc['mint(bytes,bytes)'](payload, proof)
```

[Prod tx](https://etherscan.io/tx/0xc70e0593bf8e52d238a2a812ee8a3f97d14f0dbb5c2dda60d8f221c56bf82633)

## Misc

There are different methods to mint LBTC.

### Function: `mint(address to, uint256 amount)`
> **IMPORTANT**: Only allowed for whitelisted minters such as PMM modules.
>
Mint LBTC to the specified address without proof and payload.

**Example:**

```typescript
await lbtc.mint[address,amount](toAddress, amount)
```

### Function: `batchMint(address[] calldata to,uint256[] calldata amount)`
> **IMPORTANT**: Only allowed for whitelisted minters such as PMM modules.
Mint LBTC to the specified address without proof and payload.

0 comments on commit 286c213

Please sign in to comment.