Skip to content

Commit 28389a1

Browse files
committed
Update README
1 parent da57d6b commit 28389a1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ extern "C" fn allocate(size: usize) -> u32;
102102
extern "C" fn deallocate(pointer: u32);
103103

104104
extern "C" fn init(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32;
105-
extern "C" fn handle(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32;
105+
extern "C" fn execute(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32;
106106
extern "C" fn query(env_ptr: u32, msg_ptr: u32) -> u32;
107107
extern "C" fn migrate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32;
108108
```
109109

110110
`allocate`/`deallocate` allow the host to manage data within the Wasm VM. If
111111
you're using Rust, you can implement them by simply
112112
[re-exporting them from cosmwasm::exports](https://github.com/CosmWasm/cosmwasm/blob/v0.6.3/contracts/hackatom/src/lib.rs#L5).
113-
`init`, `handle` and `query` must be defined by your contract.
113+
`init`, `execute` and `query` must be defined by your contract.
114114

115115
### Imports
116116

@@ -194,8 +194,8 @@ pub struct Region {
194194
If you followed the [instructions above](#Creating), you should have a runable
195195
smart contract. You may notice that all of the Wasm exports are taken care of by
196196
`lib.rs`, which should shouldn't need to modify. What you need to do is simply
197-
look in `contract.rs` and implement `init` and `handle` functions, defining your
198-
custom `InitMsg` and `HandleMsg` structs for parsing your custom message types
197+
look in `contract.rs` and implement `init` and `execute` functions, defining your
198+
custom `InitMsg` and `ExecuteMsg` structs for parsing your custom message types
199199
(as json):
200200

201201
```rust
@@ -206,18 +206,18 @@ pub fn init<S: Storage, A: Api, Q: Querier>(
206206
msg: InitMsg,
207207
) -> StdResult<Response> {}
208208

209-
pub fn handle<S: Storage, A: Api, Q: Querier>(
209+
pub fn execute<S: Storage, A: Api, Q: Querier>(
210210
deps: &mut Deps<S, A, Q>,
211211
env: Env,
212212
info: MessageInfo,
213-
msg: HandleMsg,
213+
msg: ExecuteMsg,
214214
) -> Result<Response, ContractError> { }
215215

216216
pub fn migrate<S: Storage, A: Api, Q: Querier>(
217217
deps: &mut Deps<S, A, Q>,
218218
env: Env,
219219
info: MessageInfo,
220-
msg: HandleMsg,
220+
msg: ExecuteMsg,
221221
) -> Result<Response, MigrateError> { }
222222

223223
pub fn query<S: Storage, A: Api, Q: Querier>(

0 commit comments

Comments
 (0)