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
Yeah, I think send would be more intuitive for sure. We already have plans to do certain naming changes to make things more consistent and intuitive, so we can also include this change during that time.
There was a similar discussion for web3 js v2. send was chosen (and they didn't feel like changing when the discussion came up) but execute makes more sense as send creates ambiguity between sending transactions and sending lamports and sending SPL tokens.
execute would be technically incorrect imo, since the TS client is only responsible for sending the transaction, and the execution is done by the validators.
Also, Anchor's send method is namespaced by the program's instruction name, so I'm not sure how it would create the ambiguity you mentioned. It's different for web3js v2 because, from what I've seen, it follows a functional style with a bunch of function declarations, which is great for bundle size but worse for ambiguity/explorability.
const tx = await program.methods.initialize().rpc();
rpc
is not like an action.maybe
send
,execute
orcall
is betterThe text was updated successfully, but these errors were encountered: