func (w *Wasmer) Execute(
	code CodeID,
	env types.Env,
	executeMsg []byte,
	store KVStore,
	goapi GoAPI,
	querier Querier,
	gasMeter GasMeter,
	gasLimit uint64,
) (*types.HandleResponse, uint64, error) {
	paramBin, err := json.Marshal(env)
	if err != nil {
		return nil, 0, err
	}

	data, gasUsed, err := api.Handle(w.cache, code, paramBin, executeMsg, &gasMeter, store, &goapi, &querier, gasLimit)
	if err != nil {
		return nil, gasUsed, err
	}

	var resp types.HandleResult
	err = json.Unmarshal(data, &resp)

	if err != nil {
		return nil, gasUsed, err
	}

	if resp.Err != nil {
		return nil, gasUsed, fmt.Errorf("%v", resp.Err)
	}

	return resp.Ok, gasUsed, nil
}
// Execute calls a given contract. Since the only difference between contracts with the same CodeID is the
// data in their local storage, and their address in the outside world, we need no ContractID here.
// (That is a detail for the external, sdk-facing, side).
//
// The caller is responsible for passing the correct `store` (which must have been initialized exactly once),
// and setting the env with relevent info on this instance (address, balance, etc)
Execute calls a given contract. Since the only difference between contracts with the same CodeID is the
data in their local storage, and their address in the outside world, we need no ContractID here.
(That is a detail for the external, sdk-facing, side).

The caller is responsible for passing the correct `store` (which must have been initialized exactly once),
and setting the env with relevent info on this instance (address, balance, etc)
// Execute calls a given contract . Since the only difference between contracts with the same CodeID is the // data in their local storage and their address in the outside world we need no ContractID here . // ( That is a detail for the external sdk - facing side ) . // // The caller is responsible for passing the correct ` store ` ( which must have been initialized exactly once ) // and setting the env with relevent info on this instance ( address balance etc )
func (w *Wasmer) Execute(
	code CodeID,
	env types.Env,
	executeMsg []byte,
	store KVStore,
	goapi GoAPI,
	querier Querier,
	gasMeter GasMeter,
	gasLimit uint64,
) (*types.HandleResponse, uint64, error) {
	paramBin, err := json.Marshal(env)
	if err != nil {
		return nil, 0, err
	}
	data, gasUsed, err := api.Handle(w.cache, code, paramBin, executeMsg, &gasMeter, store, &goapi, &querier, gasLimit)
	if err != nil {
		return nil, gasUsed, err
	}
	var resp types.HandleResult
	err = json.Unmarshal(data, &resp)
	if err != nil {
		return nil, gasUsed, err
	}
	if resp.Err != nil {
		return nil, gasUsed, fmt.Errorf("%v", resp.Err)
	}
	return resp.Ok, gasUsed, nil
}
func ( w * Wasmer ) Execute ( code CodeID , env types . Env , executeMsg [ ] byte , store KVStore , goapi GoAPI , querier Querier , gasMeter GasMeter , gasLimit uint64 , ) ( * types . HandleResponse , uint64 , error ) { paramBin , err := json . Marshal ( env ) if err != nil { return nil , 0 , err } data , gasUsed , err := api . Handle ( w . cache , code , paramBin , executeMsg , & gasMeter , store , & goapi , & querier , gasLimit ) if err != nil { return nil , gasUsed , err } var resp types . HandleResult err = json . Unmarshal ( data , & resp ) if err != nil { return nil , gasUsed , err } if resp . Err != nil { return nil , gasUsed , fmt . Errorf ( " " , resp . Err ) } return resp . Ok , gasUsed , nil }
Execute calls a given contract.
Execute calls a given contract .