File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
substrate/frame/revive/src Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1232,9 +1232,22 @@ where
12321232 let is_pvm = executable. is_pvm ( ) ;
12331233
12341234 if_tracing ( |tracer| {
1235+ // For DELEGATECALL, `from` is the contract making the delegatecall and
1236+ // `to` is the target contract whose code is being executed.
1237+ let ( from, to) = match frame. delegate . as_ref ( ) {
1238+ Some ( delegate) =>
1239+ ( T :: AddressMapper :: to_address ( & frame. account_id ) , delegate. callee ) ,
1240+ None => (
1241+ self . caller ( )
1242+ . account_id ( )
1243+ . map ( T :: AddressMapper :: to_address)
1244+ . unwrap_or_default ( ) ,
1245+ T :: AddressMapper :: to_address ( & frame. account_id ) ,
1246+ ) ,
1247+ } ;
12351248 tracer. enter_child_span (
1236- self . caller ( ) . account_id ( ) . map ( T :: AddressMapper :: to_address ) . unwrap_or_default ( ) ,
1237- T :: AddressMapper :: to_address ( & frame . account_id ) ,
1249+ from ,
1250+ to ,
12381251 frame. delegate . as_ref ( ) . map ( |delegate| delegate. callee ) ,
12391252 frame. read_only ,
12401253 frame. value_transferred ,
You can’t perform that action at this time.
0 commit comments