Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Fix DAO Pulgin Event #118

Merged
merged 1 commit into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/StarcoinFramework/BuildInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ compiled_package_info:
? address: "0x00000000000000000000000000000001"
name: YieldFarmingV2
: StarcoinFramework
source_digest: 8E7AEB189849D23881D6C14563228D20E8991069B2A727CBB2D0A5FBAA816EC4
source_digest: B7532EE5E9C8A1193C77FE19E7AE49D681E650064C2BE33605779EE6B7E56BC6
build_flags:
dev_mode: false
test_mode: false
Expand Down
12 changes: 6 additions & 6 deletions integration-tests/daospace/stake_to_sbt_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ task 4 'run'. lines 9-17:

task 6 'run'. lines 61-69:
{
"gas_used": 1288799,
"gas_used": 1672577,
"status": "Executed"
}

task 7 'run'. lines 71-107:
{
"gas_used": 569616,
"gas_used": 654799,
"status": "Executed"
}

Expand Down Expand Up @@ -52,24 +52,24 @@ task 10 'run'. lines 124-137:

task 11 'run'. lines 139-155:
{
"gas_used": 336881,
"gas_used": 422064,
"status": "Executed"
}

task 13 'run'. lines 159-172:
{
"gas_used": 124169,
"gas_used": 216758,
"status": "Executed"
}

task 14 'run'. lines 174-190:
{
"gas_used": 458402,
"gas_used": 543585,
"status": "Executed"
}

task 16 'run'. lines 194-209:
{
"gas_used": 133134,
"gas_used": 225723,
"status": "Executed"
}
2 changes: 1 addition & 1 deletion integration-tests/starcoin_dao/starcoin_dao.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ processed 4 tasks

task 3 'run'. lines 8-16:
{
"gas_used": 1405560,
"gas_used": 1789338,
"status": "Executed"
}
3 changes: 2 additions & 1 deletion sources/daospace/DAOSpace.move
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ module StarcoinFramework::DAOSpace {
IdentifierNFT::owns<DAOMember<DAOT>, DAOMemberBody<DAOT>>(member_addr)
}

struct PluginEvent<phantom DAOT, phantom PluginT, phantom EventT> has key, store {
struct PluginEvent<phantom DAOT : store, phantom PluginT: store, phantom EventT: store + drop> has key, store {
event_handle: Event::EventHandle<EventT>,
}

Expand Down Expand Up @@ -1115,6 +1115,7 @@ module StarcoinFramework::DAOSpace {
public fun acquire_plugin_event_cap<DAOT: store, PluginT>(_witness: &PluginT): DAOPluginEventCap<DAOT, PluginT> acquires InstalledPluginInfo {
validate_cap<DAOT, PluginT>(plugin_event_cap_type());
DAOPluginEventCap<DAOT, PluginT> {}
}

/// Delegate the token mint capability to DAO
/// _witness parameter ensures that the caller is the module which define PluginT
Expand Down
2 changes: 1 addition & 1 deletion sources/daospaceplugin/StakeToSBTPlugin.move
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ module StarcoinFramework::StakeToSBTPlugin {

/// Accept token with token type by given DAO root capability
public fun accept_token_with_root_cap<DAOT: store, TokenT: store>(_cap: &DAOSpace::DAORootCap<DAOT>) {
accept_token(AcceptTokenCap<DAOT, TokenT> {});
install_event<DAOT>();
accept_token(AcceptTokenCap<DAOT, TokenT> {});
}

public fun install_event<DAOT: store>() {
Expand Down