@@ -28,7 +28,7 @@ mod benchmarks {
2828 }
2929
3030 #[ benchmark]
31- fn delegate_emission_permission ( ) {
31+ fn delegate_stream_permission ( ) {
3232 let delegator: T :: AccountId = account ( "delegator" , 0 , 0 ) ;
3333 let recipient: T :: AccountId = account ( "recipient" , 1 , 0 ) ;
3434
@@ -42,15 +42,15 @@ mod benchmarks {
4242
4343 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
4444 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
45- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
45+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
4646 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
4747 let distribution = DistributionControl :: Manual ;
4848 let duration = PermissionDuration :: Indefinite ;
4949 let revocation = RevocationTerms :: RevocableByDelegator ;
5050 let enforcement = EnforcementAuthority :: None ;
5151
5252 #[ extrinsic_call]
53- delegate_emission_permission (
53+ delegate_stream_permission (
5454 RawOrigin :: Signed ( delegator) ,
5555 recipients,
5656 allocation,
@@ -78,9 +78,9 @@ mod benchmarks {
7878
7979 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
8080 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
81- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
81+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
8282 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
83- let permission_id = ext:: emission_impl :: delegate_emission_permission_impl :: < T > (
83+ let permission_id = ext:: stream_impl :: delegate_stream_permission_impl :: < T > (
8484 delegator. clone ( ) ,
8585 recipients,
8686 allocation,
@@ -114,10 +114,10 @@ mod benchmarks {
114114 // Create permission with fixed amount allocation
115115 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
116116 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
117- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
117+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
118118 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
119119
120- let permission_id = ext:: emission_impl :: delegate_emission_permission_impl :: < T > (
120+ let permission_id = ext:: stream_impl :: delegate_stream_permission_impl :: < T > (
121121 delegator. clone ( ) ,
122122 recipients,
123123 allocation,
@@ -153,10 +153,10 @@ mod benchmarks {
153153 // Create permission with stream allocation
154154 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
155155 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
156- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
156+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
157157 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
158158
159- let permission_id = ext:: emission_impl :: delegate_emission_permission_impl :: < T > (
159+ let permission_id = ext:: stream_impl :: delegate_stream_permission_impl :: < T > (
160160 delegator. clone ( ) ,
161161 recipients,
162162 allocation,
@@ -192,7 +192,7 @@ mod benchmarks {
192192 // Create permission with fixed amount allocation and enforcement authority
193193 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
194194 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
195- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
195+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
196196 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
197197 let controllers = vec ! [ controller. clone( ) ] . try_into ( ) . unwrap ( ) ;
198198
@@ -201,7 +201,7 @@ mod benchmarks {
201201 required_votes : 1 ,
202202 } ;
203203
204- let permission_id = ext:: emission_impl :: delegate_emission_permission_impl :: < T > (
204+ let permission_id = ext:: stream_impl :: delegate_stream_permission_impl :: < T > (
205205 delegator. clone ( ) ,
206206 recipients,
207207 allocation,
@@ -237,10 +237,10 @@ mod benchmarks {
237237
238238 let stream_id: StreamId = [ 0 ; 32 ] . into ( ) ;
239239 let streams = BTreeMap :: from ( [ ( stream_id, Percent :: from_percent ( 30 ) ) ] ) ;
240- let allocation = EmissionAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
240+ let allocation = StreamAllocation :: Streams ( streams. try_into ( ) . unwrap ( ) ) ;
241241 let recipients = bounded_btree_map ! [ recipient => 100 ] ;
242242
243- let permission_id = ext:: emission_impl :: delegate_emission_permission_impl :: < T > (
243+ let permission_id = ext:: stream_impl :: delegate_stream_permission_impl :: < T > (
244244 delegator. clone ( ) ,
245245 recipients,
246246 allocation,
0 commit comments