@@ -101,7 +101,7 @@ The required exports provided by the cosmwasm smart contract are:
101101extern " C" fn allocate (size : usize ) -> u32 ;
102102extern " C" fn deallocate (pointer : u32 );
103103
104- extern " C" fn init (env_ptr : u32 , info_ptr : u32 , msg_ptr : u32 ) -> u32 ;
104+ extern " C" fn instantiate (env_ptr : u32 , info_ptr : u32 , msg_ptr : u32 ) -> u32 ;
105105extern " C" fn execute (env_ptr : u32 , info_ptr : u32 , msg_ptr : u32 ) -> u32 ;
106106extern " C" fn query (env_ptr : u32 , msg_ptr : u32 ) -> u32 ;
107107extern " C" fn migrate (env_ptr : u32 , info_ptr : u32 , msg_ptr : u32 ) -> u32 ;
@@ -110,7 +110,7 @@ extern "C" fn migrate(env_ptr: u32, info_ptr: u32, msg_ptr: u32) -> u32;
110110` allocate ` /` deallocate ` allow the host to manage data within the Wasm VM. If
111111you'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 ` , ` execute ` and ` query ` must be defined by your contract.
113+ ` instantiate ` , ` execute ` and ` query ` must be defined by your contract.
114114
115115### Imports
116116
@@ -194,16 +194,16 @@ pub struct Region {
194194If you followed the [ instructions above] ( #Creating ) , you should have a runable
195195smart 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 ` execute ` functions, defining
198- your custom ` InitMsg ` and ` ExecuteMsg ` structs for parsing your custom message
199- types (as json):
197+ look in ` contract.rs ` and implement ` instantiate ` and ` execute ` functions,
198+ defining your custom ` InstantiateMsg ` and ` ExecuteMsg ` structs for parsing your
199+ custom message types (as json):
200200
201201``` rust
202- pub fn init <S : Storage , A : Api , Q : Querier >(
202+ pub fn instantiate <S : Storage , A : Api , Q : Querier >(
203203 deps : & mut Deps <S , A , Q >,
204204 env : Env ,
205205 info : MessageInfo ,
206- msg : InitMsg ,
206+ msg : InstantiateMsg ,
207207) -> StdResult <Response > {}
208208
209209pub fn execute <S : Storage , A : Api , Q : Querier >(
0 commit comments