---
# System prepended metadata

title: BuildingBlocks - Smart Contract Review

---

# BuildingBlocks - Smart Contract Review

```
// State at t=0
account A {
    version: 10;
    tokens: {
        "FOOD": {
            clusters: {
                "0xaa": { version: 1, balance: 10, tokens: [...] },
                "0xbb": { version: 1, balance: 5, },
            },
        },
        "CASH": {
            clusters: {
                "0xcc": { version: 1, balance: 10, },
            },
        },
    }
}

// Spend 10 FOOD tokens
account A {
    version: 11;
    tokens: {
        "FOOD": {
            clusters: {
                "0xaa": { version: 2, balance: 0, tokens: [...] },
                "0xbb": { version: 1, balance: 5, },
            },
        },
        "CASH": {
            clusters: {
                "0xcc": { version: 1, balance: 10, },
            },
        },
    }
}
```
