-
Notifications
You must be signed in to change notification settings - Fork 77
Labels
A-semaArea: semantic analysisArea: semantic analysisC-enhancementCategory: an issue proposing an enhancement or a PR with oneCategory: an issue proposing an enhancement or a PR with one
Description
Describe the feature
- Contracts can be explicitly converted to address using
address(x). - Explicit conversion to an address payable is only possible if the contract has a receive or payable fallback function
For address to contract
- Unlike contract-to-address conversion, there's no restriction requiring the contract to have a receive or payable fallback function to convert from address to contract type. Simply
MyContract c = MyContract(addressValue)
https://docs.soliditylang.org/en/latest/types.html#address
http://docs.soliditylang.org/en/latest/types.html#contract-types
Additional context
No response
Metadata
Metadata
Assignees
Labels
A-semaArea: semantic analysisArea: semantic analysisC-enhancementCategory: an issue proposing an enhancement or a PR with oneCategory: an issue proposing an enhancement or a PR with one