stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
128 stars 67 forks source link

Do not generate client fns for reserved hook functions #1277

Closed leighmcculloch closed 6 months ago

leighmcculloch commented 6 months ago

What

Do not generate client fns for reserved hook functions.

Why

There's no value in generating client functions for reserved hook functions (that begin with '__') because the Soroban Env won't let them be invoked directly anyway. So by generating the functions we're creating code that can never successfully be called.

Note that the function should still be generated into the interface/trait so that someone implementing the contracts trait implements the entire contract and not a subset.

Related to https://github.com/stellar/stellar-cli/issues/1344