From 970a6201e5b6dac0319e2775910a5de5be01671f Mon Sep 17 00:00:00 2001 From: jolestar Date: Sat, 7 Dec 2024 13:11:35 +0800 Subject: [PATCH] update docs --- frameworks/bitcoin-move/doc/bbn.md | 52 ++++++++++++++++++++++ frameworks/bitcoin-move/doc/bbn_updater.md | 14 ++++++ 2 files changed, 66 insertions(+) diff --git a/frameworks/bitcoin-move/doc/bbn.md b/frameworks/bitcoin-move/doc/bbn.md index 0320bded59..85db4a69a5 100644 --- a/frameworks/bitcoin-move/doc/bbn.md +++ b/frameworks/bitcoin-move/doc/bbn.md @@ -14,6 +14,8 @@ - [Struct `BBNScriptPaths`](#0x4_bbn_BBNScriptPaths) - [Struct `BBNStakingEvent`](#0x4_bbn_BBNStakingEvent) - [Struct `BBNStakingFailedEvent`](#0x4_bbn_BBNStakingFailedEvent) +- [Struct `BBNStakingUnbondingEvent`](#0x4_bbn_BBNStakingUnbondingEvent) +- [Struct `TempStateDropEvent`](#0x4_bbn_TempStateDropEvent) - [Constants](#@Constants_0) - [Function `genesis_init`](#0x4_bbn_genesis_init) - [Function `init_for_upgrade`](#0x4_bbn_init_for_upgrade) @@ -22,6 +24,8 @@ - [Function `is_possible_bbn_transaction`](#0x4_bbn_is_possible_bbn_transaction) - [Function `process_bbn_tx_entry`](#0x4_bbn_process_bbn_tx_entry) - [Function `process_bbn_transaction`](#0x4_bbn_process_bbn_transaction) +- [Function `on_utxo_spend`](#0x4_bbn_on_utxo_spend) +- [Function `remove_bbn_seal`](#0x4_bbn_remove_bbn_seal) - [Function `add_temp_state`](#0x4_bbn_add_temp_state) - [Function `contains_temp_state`](#0x4_bbn_contains_temp_state) - [Function `borrow_temp_state`](#0x4_bbn_borrow_temp_state) @@ -45,6 +49,7 @@ use 0x1::vector; use 0x2::bcs; use 0x2::event; +use 0x2::event_queue; use 0x2::object; use 0x2::result; use 0x2::sort; @@ -159,6 +164,31 @@ + + +## Struct `BBNStakingUnbondingEvent` + + + +
struct BBNStakingUnbondingEvent has copy, drop, store
+
+ + + + + +## Struct `TempStateDropEvent` + +Event emitted when the temporary state of a BBNStakeSeal is dropped +The temporary state is dropped when the UTXO is spent +The event is onchain event, and the event_queue name is type_name of the temporary state + + +
struct TempStateDropEvent has copy, drop, store
+
+ + + ## Constants @@ -446,6 +476,28 @@ Use bbn_upda + + +## Function `on_utxo_spend` + + + +
public(friend) fun on_utxo_spend(utxo: &mut utxo::UTXO)
+
+ + + + + +## Function `remove_bbn_seal` + + + +
public(friend) fun remove_bbn_seal(seal_obj_id: object::ObjectID)
+
+ + + ## Function `add_temp_state` diff --git a/frameworks/bitcoin-move/doc/bbn_updater.md b/frameworks/bitcoin-move/doc/bbn_updater.md index 85341b5170..d0e77d769c 100644 --- a/frameworks/bitcoin-move/doc/bbn_updater.md +++ b/frameworks/bitcoin-move/doc/bbn_updater.md @@ -9,12 +9,15 @@ - [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)
use 0x1::option;
+use 0x2::object;
 use 0x4::bbn;
 use 0x4::bitcoin;
 use 0x4::types;
+use 0x4::utxo;
 
@@ -65,3 +68,14 @@ If the transaction contains an OP_RETURN output with the correct tag, it is cons
public fun is_expired(stake: &bbn::BBNStakeSeal): bool
 
+ + + + + +## Function `clear_unbonded_stakes` + + + +
public entry fun clear_unbonded_stakes(seal_obj_id: object::ObjectID)
+