You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should avoid passing around Objects and RawVals as much as possible anywhere where their type should be known or is expected to be trusted. As much as possible they should only exist at the boundary between the guest and the host.
The transfer_trustline_balance function is an interesting candidate. The only code calling that function is the token contract itself, and so it is really questionable to me why it would even be using Object as a type. At the moment the function is called the type of account_id should be concretely known and validated, so there's no reason we should passing around generic object handles anywhere other than the boundary between the guest and the host.
I think this should get less confusing the more specific types we have in XDR, both with the work happening in #679 and anything following from #599 wrapped up. I'm going to close for now but please reopen if this reoccurs as a problem.
For example, it's not clear if the
account_id
below contains a byte vector orxdr::AccountId
. We should add comments for everyObject
parameter.The text was updated successfully, but these errors were encountered: