-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Milestone
Description
It is encouraged to have an execute entry point but there are contracts that don't need one. We have some of those contracts here as development contracts. Those are exotic use case, but still they exist.
burner
#[entry_point]
pub fn execute(
_deps: DepsMut,
_env: Env,
_info: MessageInfo,
_msg: ExecuteMsg,
) -> StdResult<Response> {
Err(StdError::generic_err(
"You can only use this contract for migrations",
))
}crypto-verify
#[entry_point]
pub fn execute(
_deps: DepsMut,
_env: Env,
_info: MessageInfo,
_msg: ExecuteMsg,
) -> StdResult<Response> {
Ok(Response::default())
}The two example s already show a dilemma: is an execution with an arbitrary message a no-op (success) or an error?
There is no reason execute must always exist. Just like query, it can be encouraged but optional.
Metadata
Metadata
Assignees
Labels
No labels