Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Address::from_contract_id pub (#989)
### What Make Address::from_contract_id public and accessible to contracts. ### Why I recently hid the function because it presents some problems and constraints if used in contracts. From an portability point-of-view to be able to run a contract already built on multiple networks contracts would not have any hardcoded global state. However @orbitlens pointed out that from an optimization standpoint it may be preferred to have global state hardcoded even if that means recompiling the contract for each network it is deployed on, or for each specific deployment. The why is because no rent payments are required on the additional data entries, and that there may be some savings in not having to load a storage ledger entry. We haven't yet done the work to confirm if it is indeed cheaper, but it seems reasonable not to block developers from trying out different workflows. The SDK doesn't need to be strongly opinionated on everything, and this is an area where it feels like the SDK might be being too parental. Discussion about this occurred on Discord at: https://discord.com/channels/897514728459468821/1118888566349631561/1119051351528321054 ### Merging This change is intended to be merged to `main`, and then backported into a patch release based on the most recent release so that it can be enjoyed today. (cherry picked from commit 6d4b0b5)
- Loading branch information