File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed
Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,13 @@ spl-token-interface = "2.0.0"
191191spl-token-metadata-interface = " 0.8.0"
192192spl-type-length-value = " 0.9.0"
193193sqlx = { version = " 0.8.6" , features = [
194- " macros" ,
195- " runtime-tokio-rustls" ,
196- " postgres" ,
197- " uuid" ,
198- " chrono" ,
199- " rust_decimal" ,
200- " bigdecimal" ,
194+ " macros" ,
195+ " runtime-tokio-rustls" ,
196+ " postgres" ,
197+ " uuid" ,
198+ " chrono" ,
199+ " rust_decimal" ,
200+ " bigdecimal" ,
201201] }
202202sqlx_migrator = { version = " 0.17.0" , features = [" postgres" ] }
203203syn = { version = " 1.0" , features = [" full" ] }
Original file line number Diff line number Diff line change @@ -107,7 +107,22 @@ pub fn extract_instructions_with_metadata(
107107 & meta. inner_instructions ,
108108 transaction_metadata,
109109 & mut instructions_with_metadata,
110- |key, _| meta. loaded_addresses . writable . contains ( key) ,
110+ |key, idx| {
111+ let num_static = v0. account_keys . len ( ) ;
112+ if idx < num_static {
113+ let num_signers = v0. header . num_required_signatures as usize ;
114+ let num_readonly_signed = v0. header . num_readonly_signed_accounts as usize ;
115+ let num_readonly_unsigned =
116+ v0. header . num_readonly_unsigned_accounts as usize ;
117+ if idx < num_signers {
118+ idx < num_signers - num_readonly_signed
119+ } else {
120+ idx < num_static - num_readonly_unsigned
121+ }
122+ } else {
123+ meta. loaded_addresses . writable . contains ( key)
124+ }
125+ } ,
111126 |_, idx| idx < v0. header . num_required_signatures as usize ,
112127 ) ;
113128 }
You can’t perform that action at this time.
0 commit comments