Since #[contract] without a module is intended only for impl Contract {...}, and #[contract(module=...)] is for impl Interface for Contract {...}. In reallity, these should be two separate macros, since they are responsible for different things. Cost of that change is negligible and it will increase the "understandability" of the code for the user.
Initial proposal:
#[interface_impl(contract_module=...)]
impl Interface for Contract {
// [...]
}
This issue will be covered by https://github.com/CosmWasm/sylvia/pull/315. The mentioned PR removes the requirement for specifying #[contract(module=...)] for interface implementation on a contract.
Since
#[contract]
without a module is intended only forimpl Contract {...}
, and#[contract(module=...)]
is forimpl Interface for Contract {...}
. In reallity, these should be two separate macros, since they are responsible for different things. Cost of that change is negligible and it will increase the "understandability" of the code for the user.Initial proposal: