-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |