Skip to content

Commit 4ebe51b

Browse files
authored
[Feature] Proposal add title and introduction (#183)
* Add title and introduction * description -> extend * Event add introduction
1 parent f186ec8 commit 4ebe51b

30 files changed

+231
-173
lines changed
Binary file not shown.
Binary file not shown.

build/StarcoinFramework/docs/InstallPluginProposalPlugin.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150

151151

152152

153-
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, required_caps: vector&lt;<a href="DAOSpace.md#0x1_DAOSpace_CapType">DAOSpace::CapType</a>&gt;, description: vector&lt;u8&gt;, action_delay: u64)
153+
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, required_caps: vector&lt;<a href="DAOSpace.md#0x1_DAOSpace_CapType">DAOSpace::CapType</a>&gt;, title: vector&lt;u8&gt;, introduction: vector&lt;u8&gt;, description: vector&lt;u8&gt;, action_delay: u64)
154154
</code></pre>
155155

156156

@@ -159,15 +159,15 @@
159159
<summary>Implementation</summary>
160160

161161

162-
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, required_caps: vector&lt;CapType&gt;, description: vector&lt;u8&gt;, action_delay: u64){
162+
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, required_caps: vector&lt;CapType&gt;, title:vector&lt;u8&gt;, introduction:vector&lt;u8&gt;, description: vector&lt;u8&gt;, action_delay: u64){
163163
<b>let</b> witness = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>{};
164164

165165
<b>let</b> cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_proposal_cap">DAOSpace::acquire_proposal_cap</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>&gt;(&witness);
166166
<b>let</b> action = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>&lt;ToInstallPluginT&gt;{
167167
required_caps,
168168
};
169169

170-
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, sender, action, description, action_delay);
170+
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, sender, action, title, introduction, description, action_delay);
171171
}
172172
</code></pre>
173173

build/StarcoinFramework/docs/MemberProposalPlugin.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197

198198

199199

200-
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
200+
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, title: vector&lt;u8&gt;, introduction: vector&lt;u8&gt;, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
201201
</code></pre>
202202

203203

@@ -206,7 +206,7 @@
206206
<summary>Implementation</summary>
207207

208208

209-
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
209+
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, title:vector&lt;u8&gt;, introduction:vector&lt;u8&gt;, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
210210
<b>let</b> witness = <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>{};
211211
<b>let</b> cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_proposal_cap">DAOSpace::acquire_proposal_cap</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>&gt;(&witness);
212212
<b>let</b> action = <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>{
@@ -217,7 +217,7 @@
217217
};
218218
<b>assert</b>!(!<a href="DAOSpace.md#0x1_DAOSpace_is_exist_member_offer">DAOSpace::is_exist_member_offer</a>&lt;DAOT&gt;(member), <a href="Errors.md#0x1_Errors_already_published">Errors::already_published</a>(<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_ERR_MEMBER_OFFER_EXIST">ERR_MEMBER_OFFER_EXIST</a>));
219219
<b>assert</b>!(!<a href="DAOSpace.md#0x1_DAOSpace_is_member">DAOSpace::is_member</a>&lt;DAOT&gt;(member), <a href="Errors.md#0x1_Errors_already_published">Errors::already_published</a>(<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_ERR_MEMBER_EXIST">ERR_MEMBER_EXIST</a>));
220-
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, sender, action, description, action_delay);
220+
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, sender, action, title, introduction, description, action_delay);
221221
}
222222
</code></pre>
223223

@@ -231,7 +231,7 @@
231231

232232

233233

234-
<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
234+
<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, title: vector&lt;u8&gt;, introduction: vector&lt;u8&gt;, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
235235
</code></pre>
236236

237237

@@ -240,8 +240,8 @@
240240
<summary>Implementation</summary>
241241

242242

243-
<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
244-
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT&gt;(&sender, description, member, image_data, image_url, init_sbt, action_delay);
243+
<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, title:vector&lt;u8&gt;, introduction:vector&lt;u8&gt;, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
244+
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT&gt;(&sender, title, introduction, description, member, image_data, image_url, init_sbt, action_delay);
245245
}
246246
</code></pre>
247247

@@ -307,7 +307,7 @@
307307

308308

309309

310-
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, action_delay: u64)
310+
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT: store&gt;(sender: &signer, title: vector&lt;u8&gt;, introduction: vector&lt;u8&gt;, description: vector&lt;u8&gt;, action_delay: u64)
311311
</code></pre>
312312

313313

@@ -316,8 +316,8 @@
316316
<summary>Implementation</summary>
317317

318318

319-
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT:store&gt;(sender:&signer, description: vector&lt;u8&gt;,action_delay:u64){
320-
<a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">InstallPluginProposalPlugin::create_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(sender, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_required_caps">required_caps</a>(), description, action_delay);
319+
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT:store&gt;(sender:&signer, title:vector&lt;u8&gt;, introduction:vector&lt;u8&gt;, description: vector&lt;u8&gt;,action_delay:u64){
320+
<a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">InstallPluginProposalPlugin::create_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(sender, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_required_caps">required_caps</a>(), title, introduction, description, action_delay);
321321
}
322322
</code></pre>
323323

@@ -331,7 +331,7 @@
331331

332332

333333

334-
<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, action_delay: u64)
334+
<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, title: vector&lt;u8&gt;, introduction: vector&lt;u8&gt;, description: vector&lt;u8&gt;, action_delay: u64)
335335
</code></pre>
336336

337337

@@ -340,8 +340,8 @@
340340
<summary>Implementation</summary>
341341

342342

343-
<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT:store&gt;(sender:signer, description: vector&lt;u8&gt;, action_delay:u64){
344-
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT&gt;(&sender, description, action_delay);
343+
<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT:store&gt;(sender:signer, title:vector&lt;u8&gt;, introduction:vector&lt;u8&gt;, description: vector&lt;u8&gt;, action_delay:u64){
344+
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT&gt;(&sender, title, introduction, description, action_delay);
345345
}
346346
</code></pre>
347347

Binary file not shown.
Binary file not shown.

integration-tests/daospace/dao_proposal.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ task 22 'run'. lines 299-310:
6060

6161
task 23 'run'. lines 313-337:
6262
{
63-
"gas_used": 476235,
63+
"gas_used": 480715,
6464
"status": "Executed"
6565
}
6666

@@ -109,7 +109,7 @@ task 34 'run'. lines 402-415:
109109

110110
task 36 'run'. lines 420-435:
111111
{
112-
"gas_used": 106454,
112+
"gas_used": 106530,
113113
"status": "Executed"
114114
}
115115

integration-tests/daospace/dao_proposal.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module creator::DAOHelper {
103103
total,
104104
receiver,
105105
};
106-
let proposal_id = DAOSpace::create_proposal(&cap, sender, action, b"ipfs://description", action_delay);
106+
let proposal_id = DAOSpace::create_proposal(&cap, sender, action,b"title",b"ipfs://introduction", b"ipfs://extend", action_delay);
107107
checkpoint<DAOT>(proposal_id);
108108

109109
proposal_id

integration-tests/daospace/dao_proposal_rejected.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module creator::DAOHelper {
8181
total,
8282
receiver,
8383
};
84-
let proposal_id = DAOSpace::create_proposal(&cap, sender, action, b"ipfs://description", action_delay);
84+
let proposal_id = DAOSpace::create_proposal(&cap, sender, action,b"title",b"ipfs://introduction", b"ipfs://extend", action_delay);
8585
checkpoint<DAOT>(proposal_id);
8686

8787
proposal_id

integration-tests/daospaceplugin/gas_oracle_plugin.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ task 16 'run'. lines 140-149:
3838

3939
task 17 'run'. lines 152-177:
4040
{
41-
"gas_used": 449602,
41+
"gas_used": 459302,
4242
"status": "Executed"
4343
}
4444

0 commit comments

Comments
 (0)