Skip to content

Commit

Permalink
Revert "feat: add entry for plugin marketplace (#199)"
Browse files Browse the repository at this point in the history
This reverts commit 459ce12.
  • Loading branch information
nkysg committed Mar 3, 2023
1 parent fd03dc8 commit f580c9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 53 deletions.
44 changes: 0 additions & 44 deletions sources/daospace/DAOExtensionPoint.move
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,6 @@ module StarcoinFramework::DAOExtensionPoint {
);
}

public fun has_star_plugin<ExtPointT>(sender: &signer): bool {
let sender_addr = Signer::address_of(sender);
return exists<Star<ExtPointT>>(sender_addr)
}

public fun star<ExtPointT>(sender: &signer) acquires Entry, ExtensionPointEventHandlers {
let sender_addr = Signer::address_of(sender);
assert!(!exists<Star<ExtPointT>>(sender_addr), Errors::invalid_state(ERR_STAR_ALREADY_STARED));
Expand Down Expand Up @@ -395,43 +390,4 @@ module StarcoinFramework::DAOExtensionPoint {
},
);
}

// public entrys
public(script) fun register_entry<ExtPointT: store>(sender: signer, name: vector<u8>, description: vector<u8>, types_d_ts:vector<u8>, dts_doc:vector<u8>,
labels: vector<vector<u8>>) acquires Registry, NFTMintCapHolder, RegistryEventHandlers {
let option_labels = if(Vector::length(&labels) == 0){
Option::none<vector<vector<u8>>>()
} else {
Option::some(labels)
};

register<ExtPointT>(&sender, name, description, types_d_ts, dts_doc, option_labels);
}

public(script) fun publish_version_entry<ExtPointT: store>(
sender: signer,
tag: vector<u8>,
types_d_ts:vector<u8>,
dts_doc: vector<u8>,
) acquires Entry, ExtensionPointEventHandlers {
publish_version<ExtPointT>(&sender, tag, types_d_ts, dts_doc);
}

public(script) fun update_entry<ExtPointT>(sender: signer, name: vector<u8>, description: vector<u8>, labels: vector<vector<u8>>) acquires Entry, ExtensionPointEventHandlers {
let option_labels = if(Vector::length(&labels) == 0){
Option::none<vector<vector<u8>>>()
} else {
Option::some(labels)
};

update<ExtPointT>(&sender, name, description, option_labels);
}

public(script) fun star_entry<ExtPointT:store>(sender: signer) acquires Entry, ExtensionPointEventHandlers {
star<ExtPointT>(&sender);
}

public(script) fun unstar_entry<ExtPointT:store>(sender: signer) acquires Star, Entry, ExtensionPointEventHandlers {
unstar<ExtPointT>(&sender);
}
}
9 changes: 0 additions & 9 deletions sources/daospace/DAOPluginMarketplace.move
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,5 @@ module StarcoinFramework::DAOPluginMarketplace {
},
);
}

// public entrys
public(script) fun star_plugin_entry<PluginT>(sender: signer) acquires PluginEntry, PluginEventHandlers {
star_plugin<PluginT>(&sender);
}

public(script) fun unstar_plugin_entry<PluginT>(sender: signer) acquires PluginEntry, Star, PluginEventHandlers {
unstar_plugin<PluginT>(&sender);
}
}

0 comments on commit f580c9e

Please sign in to comment.