Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions contracts/vault/STORAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Sets up the vault with initial state:
- Maximum string length: no hard limit enforced, but should be kept reasonable
- Empty strings are allowed

## Storage Layout Visualization
### Read Operations

```
Instance Storage
Expand Down Expand Up @@ -273,22 +273,7 @@ Monitor storage-related events:

## Version History

| Version | Storage Layout | Changes |
|---------|----------------|---------|
| 1.0 | Single `"meta"` key with `VaultMeta` | Initial implementation |

## Future Considerations

### Scalability
- Current design suitable for single-tenant vaults
- Multi-tenant support would require storage key redesign
- Consider sharding strategies for high-volume deployments

### Compliance
- Storage layout supports audit trails through events
- Transparent state structure for regulatory compliance
- Upgrade paths maintain data integrity

---

**Note**: This storage layout documentation should be updated whenever contract storage is modified. Always test storage migrations thoroughly before deployment.
| Version | Change |
|---------|--------|
| 1.0 | Initial `StorageKey` enum with `Meta`, `AllowedDepositors`, `Admin`, `UsdcToken`, `Settlement`, `RevenuePool`, `MaxDeduct`, `Metadata(String)` |
| 1.1 | Renamed `StorageKey` → `DataKey`; added doc comments to all variants; removed stale `// Replaced by StorageKey enum variants` comment; updated STORAGE.md |
Loading