Skip to content

Commit

Permalink
Add basic reply docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed May 6, 2024
1 parent 5430da8 commit aba6596
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/pages/core/entrypoints/reply.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,23 @@ tags: ["core", "entrypoints"]
import { Callout } from "nextra/components";

# Reply

The `reply` endpoint is another special one.

It relates to CosmWasm's actor model which dictates how you call other contracts
and interact with them.

<Callout>TODO: Link to the actor model section once we have one</Callout>

This endpoint gets invoked when the execution of an external contract you called
finished. The reply parameter then lets you inspect and work with the response
the contract produced.

## Definition

```rust filename="contract.rs" template="core"
#[entry_point]
pub fn reply(deps: DepsMut, env: Env, msg: cosmwasm_std::Reply) -> StdResult<Response> {
Ok(Response::default())
}
```

0 comments on commit aba6596

Please sign in to comment.