Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Dec 16, 2024
1 parent 900ccb9 commit d6cfb28
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
75 changes: 75 additions & 0 deletions aptos-move/framework/aptos-framework/doc/dkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ DKG on-chain states and helper functions.


- [Struct `DKGSessionMetadata`](#0x1_dkg_DKGSessionMetadata)
- [Enum `TestEnum`](#0x1_dkg_TestEnum)
- [Struct `DKGStartEvent`](#0x1_dkg_DKGStartEvent)
- [Struct `DKGSessionState`](#0x1_dkg_DKGSessionState)
- [Resource `DKGState`](#0x1_dkg_DKGState)
- [Constants](#@Constants_0)
- [Function `test_a`](#0x1_dkg_test_a)
- [Function `initialize`](#0x1_dkg_initialize)
- [Function `start`](#0x1_dkg_start)
- [Function `finish`](#0x1_dkg_finish)
Expand Down Expand Up @@ -80,6 +82,55 @@ This can be considered as the public input of DKG.
</dl>


</details>

<a id="0x1_dkg_TestEnum"></a>

## Enum `TestEnum`



<pre><code>enum <a href="dkg.md#0x1_dkg_TestEnum">TestEnum</a> <b>has</b> drop
</code></pre>



<details>
<summary>Variants</summary>


<details>
<summary>A</summary>


<details>
<summary>Fields</summary>


<dl>
</dl>


</details>

</details>

<details>
<summary>B</summary>


<details>
<summary>Fields</summary>


<dl>
</dl>


</details>

</details>

</details>

<a id="0x1_dkg_DKGStartEvent"></a>
Expand Down Expand Up @@ -214,6 +265,30 @@ The completed and in-progress DKG sessions.



<a id="0x1_dkg_test_a"></a>

## Function `test_a`



<pre><code><b>fun</b> <a href="dkg.md#0x1_dkg_test_a">test_a</a>(): <a href="dkg.md#0x1_dkg_TestEnum">dkg::TestEnum</a>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>fun</b> <a href="dkg.md#0x1_dkg_test_a">test_a</a>(): <a href="dkg.md#0x1_dkg_TestEnum">TestEnum</a> {
TestEnum::A
}
</code></pre>



</details>

<a id="0x1_dkg_initialize"></a>

## Function `initialize`
Expand Down
15 changes: 15 additions & 0 deletions aptos-move/framework/aptos-framework/sources/dkg.move
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ module aptos_framework::dkg {
target_validator_set: vector<ValidatorConsensusInfo>,
}

enum TestEnum has drop {
A,
B
}

fun test_a(): TestEnum {
TestEnum::A
}

#[event]
struct DKGStartEvent has drop, store {
session_metadata: DKGSessionMetadata,
Expand Down Expand Up @@ -118,4 +127,10 @@ module aptos_framework::dkg {
public fun session_dealer_epoch(session: &DKGSessionState): u64 {
session.metadata.dealer_epoch
}

#[test]
public entry fun test() {
test_a() == TestEnum::A;
}

}

0 comments on commit d6cfb28

Please sign in to comment.