# CosmWasm vs Secret CosmWasm

### Cosmwasm and Secret

Secret Contracts are an implementation of the Rust-based library CosmWasm, while additionally enabling computation with private metadata. This brings unique use cases to Secret Network which aren’t possible on other blockchains, and also means that **Secret Contracts have features that are different from standard CosmWasm contracts including: contract hashes, a specialized approach to iterators, raw queries, and contract migration.**&#x20;

{% hint style="info" %}
An in-depth analysis of [a smart contract](https://github.com/scrtlabs/crosschain-contract-demo/blob/old-std-name/src/contract.rs) that can be **deployed on a vanilla CosmWasm chain as well as Secret Network** can be found in our [cross-deployment tutorial.](/secret-network-documentation/development/development-concepts/cross-deploy-vanilla-cw-and-secret-contracts.md)
{% endhint %}

### Contract Hashes

Contract hashes are required to bind a transaction to the specific contract being called. Otherwise, in a forked chain you could replace the called contract with one that decrypts and prints the input message.

### Iterator Feature

Secret contracts do not have access to standard CosmWasm iterators because keys and values of data are encrypted when stored on-chain. This means that there is no logical structure that can allow iteration over these keys. However, Secret Labs has developed iterator functionality that can be imported using the [Secret Toolkit storage package.](https://github.com/scrtlabs/secret-toolkit/tree/master/packages/storage)

### Raw Query

Raw queries are not available since raw data is encrypted when stored on-chain. Data can be decrypted only by the contract that owns the data, and so data is only available via permissioned contract queries (smart queries).

### CW-plus

CW-plus, a toolkit for CosmWasm contracts is largely supported but might not be optimal to use in all cases. Secret has its own Toolkit called [Secret-Toolkit](/secret-network-documentation/development/example-contracts/tools-and-libraries/smart-contract-tools-utils/secret-toolkit.md) that has the majority of CW-plus functionality. Alternatively one can alter small parts of CW-plus around the missing Iterator feature to leverage that library as well.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scrt.network/secret-network-documentation/development/development-concepts/secret-contract-cosmwasm-framework/differences-from-vanilla-cw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
