@@ -67,6 +67,12 @@ pub enum Permission{
6767 RemoveAuth ,
6868 UpdateLabel ,
6969 RemoveMarketplace ,
70+ EnlistSellOffer ,
71+ TakeSellOffer ,
72+ DuplicateOffer ,
73+ RemoveOffer ,
74+ EnlistBuyOffer ,
75+ TakeBuyOffer ,
7076}
7177
7278impl Permission {
@@ -77,6 +83,12 @@ impl Permission{
7783 Self :: RemoveAuth => "RemoveAuth" . as_bytes ( ) . to_vec ( ) ,
7884 Self :: UpdateLabel => "UpdateLabel" . as_bytes ( ) . to_vec ( ) ,
7985 Self :: RemoveMarketplace => "RemoveMarketplace" . as_bytes ( ) . to_vec ( ) ,
86+ & Self :: EnlistSellOffer =>"EnlistSellOffer" . as_bytes ( ) . to_vec ( ) ,
87+ & Self :: TakeSellOffer =>"TakeSellOffer" . as_bytes ( ) . to_vec ( ) ,
88+ & Self :: DuplicateOffer =>"DuplicateOffer" . as_bytes ( ) . to_vec ( ) ,
89+ & Self :: RemoveOffer =>"RemoveOffer" . as_bytes ( ) . to_vec ( ) ,
90+ & Self :: EnlistBuyOffer =>"EnlistBuyOffer" . as_bytes ( ) . to_vec ( ) ,
91+ & Self :: TakeBuyOffer =>"TakeBuyOffer" . as_bytes ( ) . to_vec ( ) ,
8092 }
8193 }
8294
@@ -92,6 +104,18 @@ impl Permission{
92104 UpdateLabel . to_vec ( ) ,
93105 RemoveMarketplace . to_vec ( ) ] . to_vec ( )
94106 }
107+
108+ pub fn participant_permissions ( ) ->Vec < Vec < u8 > > {
109+ use crate :: types:: Permission :: * ;
110+ [
111+ EnlistSellOffer . to_vec ( ) ,
112+ TakeSellOffer . to_vec ( ) ,
113+ DuplicateOffer . to_vec ( ) ,
114+ RemoveOffer . to_vec ( ) ,
115+ EnlistBuyOffer . to_vec ( ) ,
116+ TakeBuyOffer . to_vec ( ) ,
117+ ] . to_vec ( )
118+ }
95119}
96120
97121#[ derive( CloneNoBound , Encode , Decode , Eq , PartialEq , RuntimeDebugNoBound , Default , TypeInfo , MaxEncodedLen , ) ]
0 commit comments