forked from rooch-network/rooch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bitcoin_move] process Babylon protocol when processing Bitcoin trans…
…actions (rooch-network#2988) * [bitcoin_move] process Babylon protocol when process Bitcoin tx * [bbn] Init BBN Cap 3 global parameters * [bbn] Unbunding bbn stake when UTXO spent * update docs * [bbn] Remove assert in process_bbn_transaction
- Loading branch information
1 parent
f429275
commit 59b24dc
Showing
7 changed files
with
516 additions
and
53 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
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,81 @@ | ||
|
||
<a name="0x4_bbn_updater"></a> | ||
|
||
# Module `0x4::bbn_updater` | ||
|
||
|
||
|
||
- [Constants](#@Constants_0) | ||
- [Function `is_possible_bbn_tx`](#0x4_bbn_updater_is_possible_bbn_tx) | ||
- [Function `process_bbn_tx_entry`](#0x4_bbn_updater_process_bbn_tx_entry) | ||
- [Function `is_expired`](#0x4_bbn_updater_is_expired) | ||
- [Function `clear_unbonded_stakes`](#0x4_bbn_updater_clear_unbonded_stakes) | ||
|
||
|
||
<pre><code><b>use</b> <a href="">0x1::option</a>; | ||
<b>use</b> <a href="">0x2::object</a>; | ||
<b>use</b> <a href="bbn.md#0x4_bbn">0x4::bbn</a>; | ||
<b>use</b> <a href="bitcoin.md#0x4_bitcoin">0x4::bitcoin</a>; | ||
<b>use</b> <a href="types.md#0x4_types">0x4::types</a>; | ||
<b>use</b> <a href="utxo.md#0x4_utxo">0x4::utxo</a>; | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="@Constants_0"></a> | ||
|
||
## Constants | ||
|
||
|
||
<a name="0x4_bbn_updater_ErrorTransactionNotFound"></a> | ||
|
||
|
||
|
||
<pre><code><b>const</b> <a href="bbn_updater.md#0x4_bbn_updater_ErrorTransactionNotFound">ErrorTransactionNotFound</a>: u64 = 1; | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="0x4_bbn_updater_is_possible_bbn_tx"></a> | ||
|
||
## Function `is_possible_bbn_tx` | ||
|
||
Check if the transaction is a possible Babylon transaction | ||
If the transaction contains an OP_RETURN output with the correct tag, it is considered a possible Babylon transaction | ||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_is_possible_bbn_tx">is_possible_bbn_tx</a>(txid: <b>address</b>): bool | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="0x4_bbn_updater_process_bbn_tx_entry"></a> | ||
|
||
## Function `process_bbn_tx_entry` | ||
|
||
|
||
|
||
<pre><code><b>public</b> entry <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_process_bbn_tx_entry">process_bbn_tx_entry</a>(txid: <b>address</b>) | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="0x4_bbn_updater_is_expired"></a> | ||
|
||
## Function `is_expired` | ||
|
||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_is_expired">is_expired</a>(stake: &<a href="bbn.md#0x4_bbn_BBNStakeSeal">bbn::BBNStakeSeal</a>): bool | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="0x4_bbn_updater_clear_unbonded_stakes"></a> | ||
|
||
## Function `clear_unbonded_stakes` | ||
|
||
|
||
|
||
<pre><code><b>public</b> entry <b>fun</b> <a href="bbn_updater.md#0x4_bbn_updater_clear_unbonded_stakes">clear_unbonded_stakes</a>(seal_obj_id: <a href="_ObjectID">object::ObjectID</a>) | ||
</code></pre> |
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
Oops, something went wrong.