fix(core): surfnet encode_ui_account to handle ReadableAccount inputs and enable agave unstable api#495
fix(core): surfnet encode_ui_account to handle ReadableAccount inputs and enable agave unstable api#495BretasArthur1 wants to merge 0 commit intotxtx:mainfrom
Conversation
|
Thanks @BretasArthur1! Sorry for the delayed review. I'm getting the update to However, I don't understand the change to the |
crates/core/src/surfnet/locker.rs
Outdated
| .map(|(pubkey, account)| RpcKeyedAccount { | ||
| pubkey: pubkey.to_string(), | ||
| account: self.encode_ui_account(pubkey, account, encoding, None, data_slice), | ||
| account: account.clone(), |
There was a problem hiding this comment.
Very minor but easy optimization: into_iter to take ownership or remote accounts, then remove account.clone() (just use account)
|
Wassup brother! np, I saw you guys rocking other stuff so I presumed u guys were busy :)
About this, so when I changed that's coming from the generic bound from the svm But if you found something different let me know, I can change |
Problem
get_program_accounts_with_configwas deprecated in favor ofget_program_ui_accounts_with_configin newersolana_rpc_clientreleasesolana_runtime::commitment::BlockCommitmentArrayhas been marked for formal inclusion in the agave unstable api (causing warns about it)Solution
encode_ui_accountgeneric overReadableAccountwith a trait-based access to raw bytes for IDL parsing, requireSyncfor locker usage, and pass through remote UiAccounts without re-encoding.solana-runtimecrate