@@ -3,7 +3,10 @@ use std::num::NonZero;
3
3
use access_managed:: {
4
4
handle_consume_scheduled_op_reply, state:: Authority , EnsureCanCallResult , Restricted ,
5
5
} ;
6
- use access_manager_types:: managed:: msg:: { InitMsg , MigrateMsg } ;
6
+ use access_manager_types:: {
7
+ managed:: msg:: { InitMsg , MigrateMsg } ,
8
+ manager,
9
+ } ;
7
10
use cosmwasm_std:: {
8
11
entry_point, to_json_binary, wasm_execute, Binary , Deps , DepsMut , Env , Event , MessageInfo ,
9
12
Reply , Response , StdError , SubMsg ,
@@ -114,6 +117,20 @@ pub fn execute(
114
117
. add_event ( Event :: new ( "counter" ) . add_attribute ( "value" , new_value. to_string ( ) ) ) )
115
118
}
116
119
ExecuteMsg :: Noop { } => Ok ( Response :: new ( ) . add_event ( Event :: new ( "noop" ) ) ) ,
120
+ ExecuteMsg :: DelegateExecute { target, data } => {
121
+ Ok ( Response :: new ( ) . add_message ( wasm_execute (
122
+ deps. storage . read_item :: < Authority > ( ) ?,
123
+ & manager:: msg:: ExecuteMsg :: Execute { target, data } ,
124
+ vec ! [ ] ,
125
+ ) ?) )
126
+ }
127
+ ExecuteMsg :: DelegateSchedule { target, data, when } => {
128
+ Ok ( Response :: new ( ) . add_message ( wasm_execute (
129
+ deps. storage . read_item :: < Authority > ( ) ?,
130
+ & manager:: msg:: ExecuteMsg :: Schedule { target, data, when } ,
131
+ vec ! [ ] ,
132
+ ) ?) )
133
+ }
117
134
ExecuteMsg :: AccessManaged ( msg) => {
118
135
access_managed:: execute ( deps, env, info, msg) . map_err ( Into :: into)
119
136
}
0 commit comments