---
# System prepended metadata

title: 'Odra: A New Smart Contract Standard for Casper'

---

# Odra: A New Smart Contract Standard for Casper

OdraDev and Casper Association are proud to announce the [__Odra 1.0__](https://github.com/odradev/odra/), a complete solution to develop, test, build, deploy, and interact with smart contracts on Casper. 

## Rapid Development

Odra is designed by developers for developers, with the main focus on optimizing the development time, it manifests in a fast code/build/test cycle, code reusability, testability, and ease of integration. Compared to existing tools, Odra results in up to 80% gains in efficiency, leaving more time for developers to focus on things that matter, like business logic, security, and user experience, rather than on the tooling, configuration, and boilerplate code. Odra is well documented and full of examples. See https://odra.dev/docs.

## Lego Bricks

Code reusability is a key factor in growing the ecosystem. The more reusable code there is, the more complex systems can be built in a shorter time. This is a key reason why Solidity became so popular and why Ethereum flourished. Odra is built around the concept of reusable modules. Just like Lego bricks, these modules can be composed into bigger and more complex systems. With a set of reusable modules, Odra allows developers to start with a full toolbox from day one. Odra includes complete implementations of [Access Control](https://odra.dev/docs/tutorials/access-control), [ERC20](https://odra.dev/docs/tutorials/erc20), [ERC721](https://github.com/odradev/odra/blob/release/1.0.0/modules/src/erc721_token.rs), [ERC1155](https://github.com/odradev/odra/blob/release/1.0.0/modules/src/erc1155_token.rs), [CEP18](https://github.com/odradev/odra/blob/release/1.0.0/modules/src/cep18_token.rs), and [CEP78](https://github.com/odradev/odra/blob/release/1.0.0/modules/src/cep78/token.rs).

## Example

Here is an example of a simple Counter contract written in Odra. In just 30 lines of code, the contract is implemented and tested.

```rust
use odra::{Var, prelude::*};

#[odra::module]
pub struct Counter {
    value: Var<u32>,
}

#[odra::module]
impl Counter {
    pub fn get_count(&self) -> u32 {
        self.value.get_or_default()
    }

    pub fn increment(&mut self) {
        self.value.set(self.get_count() + 1);
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use odra::host::{Deployer, NoArgs};

    #[test]
    fn flipping() {
        let env = odra_test::env();
        let mut contract = CounterHostRef::deploy(&env, NoArgs);
        assert_eq!(contract.get_count(), 0);
        contract.increment();
        assert_eq!(contract.get_count(), 1);
    }
}
```

What is even better, Odra allows interacting with the live networks from within the code. What is revolutionary the developer __doesn't have to deal with querying the storage manually anymore__.

```rust
use counter::CounterHostRef;
use odra::host::{Deployer, NoArgs};

fn main() {
    let env = odra_casper_livenet_env::env();
    
    env.set_gas(300_000_000_000u64);
    let mut contract = CounterHostRef::deploy(&env, NoArgs);
    
    env.set_gas(1_000_000_000u64);
    contract.increment();
    
    env.set_gas(1_000_000_000u64);
    let count = contract.get_count();
    assert_eq!(count, 1);
}
```

## Code, Documentation and Tutorials

Odra is an open source project and ships with full documentation and a lot of practical tutorials.

- [Odra Github Repository](https://github.com/odradev/odra)
- [Cargo Odra Github Repository](https://github.com/odradev/cargo-odra)
- [API Reference](https://docs.rs/odra/latest/odra)
- [Odra documentation](https://odra.dev/docs)
- [Tutorials](https://odra.dev/docs/category/tutorials)

If you are developer, leave us a star on [GitHub](https://github.com/odradev/odra/). Join the [Discord](https://discord.gg/Mm5ABc9P8k) to get support and follow [Twitter](https://twitter.com/odradev) to stay up to date.

## What's Next
Casper Network is changing fast. The Condor release and the new Virtual Machine are just around the corner, and Odra will be ready for them, so developers can focus on building the next generation of Casper smart contracts. OdraDev doesn't stop here. The next features are already in the pipeline. Stay tuned.
