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
Scope generated fn code mod by contract type name (#1556)
### What
Change the name of the generated code module that contains the generated
functions for calling the contract, so that the name includes the
contract type's name.
### Why
Prevents naming conflicts between functions with the same name across
different contract implementations. This is particularly helpful in
tests and examples where a developer may legitimately define two
contracts, that are intended to be used independently, but exist in the
same namespace. Today those contracts will see a compile error if the
contracts share the same name, which is much more of a common problem
now that constructors exist and have a common name.
This problem was reported by @ozgunozerk.
### Trying it out
Edit your Cargo.toml to include the patch:
```toml
[patch.crates-io.soroban-sdk]
git = "https://github.com/stellar/rs-soroban-sdk"
branch = "allow-coexisting-contractimpls-with-same-names"
```
0 commit comments