-
Notifications
You must be signed in to change notification settings - Fork 26
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
17 changed files
with
501 additions
and
184 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
Binary file not shown.
Binary file added
BIN
+754 Bytes
build/StarcoinFramework/bytecode_modules/InstallPluginProposalPlugin.mv
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
157 changes: 157 additions & 0 deletions
157
build/StarcoinFramework/docs/InstallPluginProposalPlugin.md
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,157 @@ | ||
|
||
<a name="0x1_InstallPluginProposalPlugin"></a> | ||
|
||
# Module `0x1::InstallPluginProposalPlugin` | ||
|
||
|
||
|
||
- [Struct `InstallPluginProposalPlugin`](#0x1_InstallPluginProposalPlugin_InstallPluginProposalPlugin) | ||
- [Struct `InstallPluginAction`](#0x1_InstallPluginProposalPlugin_InstallPluginAction) | ||
- [Function `required_caps`](#0x1_InstallPluginProposalPlugin_required_caps) | ||
- [Function `create_proposal`](#0x1_InstallPluginProposalPlugin_create_proposal) | ||
- [Function `execute_proposal`](#0x1_InstallPluginProposalPlugin_execute_proposal) | ||
|
||
|
||
<pre><code><b>use</b> <a href="GenesisDao.md#0x1_GenesisDao">0x1::GenesisDao</a>; | ||
<b>use</b> <a href="Vector.md#0x1_Vector">0x1::Vector</a>; | ||
</code></pre> | ||
|
||
|
||
|
||
<a name="0x1_InstallPluginProposalPlugin_InstallPluginProposalPlugin"></a> | ||
|
||
## Struct `InstallPluginProposalPlugin` | ||
|
||
|
||
|
||
<pre><code><b>struct</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a> <b>has</b> drop | ||
</code></pre> | ||
|
||
|
||
|
||
<details> | ||
<summary>Fields</summary> | ||
|
||
|
||
<dl> | ||
<dt> | ||
<code>dummy_field: bool</code> | ||
</dt> | ||
<dd> | ||
|
||
</dd> | ||
</dl> | ||
|
||
|
||
</details> | ||
|
||
<a name="0x1_InstallPluginProposalPlugin_InstallPluginAction"></a> | ||
|
||
## Struct `InstallPluginAction` | ||
|
||
|
||
|
||
<pre><code><b>struct</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a><ToInstallPluginT> <b>has</b> store | ||
</code></pre> | ||
|
||
|
||
|
||
<details> | ||
<summary>Fields</summary> | ||
|
||
|
||
<dl> | ||
<dt> | ||
<code>required_caps: vector<<a href="GenesisDao.md#0x1_GenesisDao_CapType">GenesisDao::CapType</a>></code> | ||
</dt> | ||
<dd> | ||
|
||
</dd> | ||
</dl> | ||
|
||
|
||
</details> | ||
|
||
<a name="0x1_InstallPluginProposalPlugin_required_caps"></a> | ||
|
||
## Function `required_caps` | ||
|
||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_required_caps">required_caps</a>(): vector<<a href="GenesisDao.md#0x1_GenesisDao_CapType">GenesisDao::CapType</a>> | ||
</code></pre> | ||
|
||
|
||
|
||
<details> | ||
<summary>Implementation</summary> | ||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_required_caps">required_caps</a>():vector<CapType>{ | ||
<b>let</b> caps = <a href="Vector.md#0x1_Vector_singleton">Vector::singleton</a>(<a href="GenesisDao.md#0x1_GenesisDao_proposal_cap_type">GenesisDao::proposal_cap_type</a>()); | ||
<a href="Vector.md#0x1_Vector_push_back">Vector::push_back</a>(&<b>mut</b> caps, <a href="GenesisDao.md#0x1_GenesisDao_install_plugin_cap_type">GenesisDao::install_plugin_cap_type</a>()); | ||
caps | ||
} | ||
</code></pre> | ||
|
||
|
||
|
||
</details> | ||
|
||
<a name="0x1_InstallPluginProposalPlugin_create_proposal"></a> | ||
|
||
## Function `create_proposal` | ||
|
||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a><DaoT: store, ToInstallPluginT>(sender: &signer, required_caps: vector<<a href="GenesisDao.md#0x1_GenesisDao_CapType">GenesisDao::CapType</a>>, action_delay: u64) | ||
</code></pre> | ||
|
||
|
||
|
||
<details> | ||
<summary>Implementation</summary> | ||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a><DaoT: store, ToInstallPluginT>(sender: &signer, required_caps: vector<CapType>, action_delay: u64){ | ||
<b>let</b> witness = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>{}; | ||
|
||
<b>let</b> cap = <a href="GenesisDao.md#0x1_GenesisDao_acquire_proposal_cap">GenesisDao::acquire_proposal_cap</a><DaoT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>>(&witness); | ||
<b>let</b> action = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a><ToInstallPluginT>{ | ||
required_caps, | ||
}; | ||
<a href="GenesisDao.md#0x1_GenesisDao_create_proposal">GenesisDao::create_proposal</a>(&cap, sender, action, action_delay); | ||
} | ||
</code></pre> | ||
|
||
|
||
|
||
</details> | ||
|
||
<a name="0x1_InstallPluginProposalPlugin_execute_proposal"></a> | ||
|
||
## Function `execute_proposal` | ||
|
||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a><DaoT: store, ToInstallPluginT>(sender: &signer, proposal_id: u64) | ||
</code></pre> | ||
|
||
|
||
|
||
<details> | ||
<summary>Implementation</summary> | ||
|
||
|
||
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a><DaoT: store, ToInstallPluginT>(sender: &signer, proposal_id: u64){ | ||
<b>let</b> witness = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>{}; | ||
<b>let</b> proposal_cap = <a href="GenesisDao.md#0x1_GenesisDao_acquire_proposal_cap">GenesisDao::acquire_proposal_cap</a><DaoT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>>(&witness); | ||
<b>let</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>{required_caps} = <a href="GenesisDao.md#0x1_GenesisDao_execute_proposal">GenesisDao::execute_proposal</a><DaoT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a><ToInstallPluginT>>(&proposal_cap, sender, proposal_id); | ||
<b>let</b> install_plugin_cap = <a href="GenesisDao.md#0x1_GenesisDao_acquire_install_plugin_cap">GenesisDao::acquire_install_plugin_cap</a><DaoT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>>(&witness); | ||
<a href="GenesisDao.md#0x1_GenesisDao_install_plugin">GenesisDao::install_plugin</a><DaoT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>, ToInstallPluginT>(&install_plugin_cap, required_caps); | ||
} | ||
</code></pre> | ||
|
||
|
||
|
||
</details> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.